[Liblas-commits] libpc: checkpoint
liblas-commits at liblas.org
liblas-commits at liblas.org
Mon Feb 7 16:54:38 EST 2011
details: http://hg.liblas.orglibpc/rev/d1e630d22d83
changeset: 8:d1e630d22d83
user: Michael P. Gerlek <mpg at flaxen.com>
date: Mon Feb 07 13:53:54 2011 -0800
description:
checkpoint
diffstat:
include/libpc/ColorFilter.hpp | 58 ++++++++++++++++
include/libpc/CropFilter.hpp | 2 +
include/libpc/FauxReader.hpp | 53 ++++++++++++++
include/libpc/FauxWriter.hpp | 59 ++++++++++++++++
include/libpc/Header.hpp | 8 +-
include/libpc/LasReader.hpp | 53 --------------
include/libpc/LasWriter.hpp | 57 ---------------
include/libpc/PointData.hpp | 37 ++++++++-
include/libpc/PointLayout.hpp | 2 +
include/libpc/Utils.hpp | 60 ++++++++++++++++
src/ColorFilter.cpp | 151 ++++++++++++++++++++++++++++++++++++++++++
src/CropFilter.cpp | 13 ++-
src/FauxReader.cpp | 109 ++++++++++++++++++++++++++++++
src/FauxWriter.cpp | 94 ++++++++++++++++++++++++++
src/LasReader.cpp | 99 ---------------------------
src/LasWriter.cpp | 83 -----------------------
src/PointData.cpp | 146 ++++++++++++++++++++++++++++++++++++---
src/PointLayout.cpp | 6 +
src/Utils.cpp | 38 ++++++++++
src/main.cpp | 12 ++-
src/prototype.vcxproj | 12 ++-
21 files changed, 827 insertions(+), 325 deletions(-)
diffs (truncated from 1394 to 300 lines):
diff -r 882f96ae9105 -r d1e630d22d83 include/libpc/ColorFilter.hpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/include/libpc/ColorFilter.hpp Mon Feb 07 13:53:54 2011 -0800
@@ -0,0 +1,58 @@
+/******************************************************************************
+* Copyright (c) 2011, Michael P. Gerlek (mpg at flaxen.com)
+*
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following
+* conditions are met:
+*
+* * Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* * Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in
+* the documentation and/or other materials provided
+* with the distribution.
+* * Neither the name of Hobu, Inc. or Flaxen Geo Consulting nor the
+* names of its contributors may be used to endorse or promote
+* products derived from this software without specific prior
+* written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+* OF SUCH DAMAGE.
+****************************************************************************/
+
+#ifndef INCLUDED_COLORFILTER_HPP
+#define INCLUDED_COLORFILTER_HPP
+
+#include "libpc/Filter.hpp"
+
+
+// adds three new u8 fields (R,G,B) for the colourization of the Z axis
+// the color is done as a ramp from the declared Z min/max values in the header
+class ColorFilter : public Filter
+{
+public:
+ ColorFilter(Stage& prevStage);
+ void initialize();
+
+ void readNextPoints(PointData&);
+
+private:
+ void getColor(float value, byte& red, byte& green, byte& blue);
+
+ ColorFilter& operator=(const ColorFilter&); // not implemented
+ ColorFilter(const ColorFilter&); // not implemented
+};
+
+#endif
diff -r 882f96ae9105 -r d1e630d22d83 include/libpc/CropFilter.hpp
--- a/include/libpc/CropFilter.hpp Mon Feb 07 11:32:25 2011 -0800
+++ b/include/libpc/CropFilter.hpp Mon Feb 07 13:53:54 2011 -0800
@@ -37,6 +37,8 @@
#include "libpc/Filter.hpp"
+
+// removes any points outside of the given Z range
class CropFilter : public Filter
{
public:
diff -r 882f96ae9105 -r d1e630d22d83 include/libpc/FauxReader.hpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/include/libpc/FauxReader.hpp Mon Feb 07 13:53:54 2011 -0800
@@ -0,0 +1,53 @@
+/******************************************************************************
+* Copyright (c) 2011, Michael P. Gerlek (mpg at flaxen.com)
+*
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following
+* conditions are met:
+*
+* * Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* * Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in
+* the documentation and/or other materials provided
+* with the distribution.
+* * Neither the name of Hobu, Inc. or Flaxen Geo Consulting nor the
+* names of its contributors may be used to endorse or promote
+* products derived from this software without specific prior
+* written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+* OF SUCH DAMAGE.
+****************************************************************************/
+
+#ifndef INCLUDED_FAUXREADER_HPP
+#define INCLUDED_FAUXREADER_HPP
+
+#include "libpc/Reader.hpp"
+
+class FauxReader : public Reader
+{
+public:
+ FauxReader(std::string file);
+ void initialize();
+
+ void readNextPoints(PointData& data);
+
+private:
+ FauxReader& operator=(const FauxReader&); // not implemented
+ FauxReader(const FauxReader&); // not implemented
+};
+
+#endif
diff -r 882f96ae9105 -r d1e630d22d83 include/libpc/FauxWriter.hpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/include/libpc/FauxWriter.hpp Mon Feb 07 13:53:54 2011 -0800
@@ -0,0 +1,59 @@
+/******************************************************************************
+* Copyright (c) 2011, Michael P. Gerlek (mpg at flaxen.com)
+*
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following
+* conditions are met:
+*
+* * Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* * Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in
+* the documentation and/or other materials provided
+* with the distribution.
+* * Neither the name of Hobu, Inc. or Flaxen Geo Consulting nor the
+* names of its contributors may be used to endorse or promote
+* products derived from this software without specific prior
+* written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+* OF SUCH DAMAGE.
+****************************************************************************/
+
+#ifndef INCLUDED_FAUXWRITER_HPP
+#define INCLUDED_FAUXWRITER_HPP
+
+#include <string>
+
+#include "libpc/Writer.hpp"
+
+class FauxWriter : public Writer
+{
+public:
+ FauxWriter(std::string filename, Stage& prevStage);
+ void initialize();
+
+private:
+ int m_numPointsWritten;
+
+ void writeBegin();
+ void writeBuffer(const PointData&);
+ void writeEnd();
+
+ FauxWriter& operator=(const FauxWriter&); // not implemented
+ FauxWriter(const FauxWriter&); // not implemented
+};
+
+#endif
diff -r 882f96ae9105 -r d1e630d22d83 include/libpc/Header.hpp
--- a/include/libpc/Header.hpp Mon Feb 07 11:32:25 2011 -0800
+++ b/include/libpc/Header.hpp Mon Feb 07 13:53:54 2011 -0800
@@ -44,6 +44,13 @@
Header(const Header&);
Header& operator=(const Header&);
+ double m_minX;
+ double m_maxX;
+ double m_minY;
+ double m_maxY;
+ double m_minZ;
+ double m_maxZ;
+
const PointLayout& getConstPointLayout() const;
PointLayout& getPointLayout();
@@ -55,7 +62,6 @@
private:
PointLayout m_pointLayout;
int m_numPoints;
-
};
#endif
diff -r 882f96ae9105 -r d1e630d22d83 include/libpc/LasReader.hpp
--- a/include/libpc/LasReader.hpp Mon Feb 07 11:32:25 2011 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/******************************************************************************
-* Copyright (c) 2011, Michael P. Gerlek (mpg at flaxen.com)
-*
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following
-* conditions are met:
-*
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in
-* the documentation and/or other materials provided
-* with the distribution.
-* * Neither the name of Hobu, Inc. or Flaxen Geo Consulting nor the
-* names of its contributors may be used to endorse or promote
-* products derived from this software without specific prior
-* written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
-* OF SUCH DAMAGE.
-****************************************************************************/
-
-#ifndef INCLUDED_LASREADER_HPP
-#define INCLUDED_LASREADER_HPP
-
-#include "libpc/Reader.hpp"
-
-class LasReader : public Reader
-{
-public:
- LasReader(std::string file);
- void initialize();
-
- void readNextPoints(PointData& data);
-
-private:
- LasReader& operator=(const LasReader&); // not implemented
- LasReader(const LasReader&); // not implemented
-};
-
-#endif
diff -r 882f96ae9105 -r d1e630d22d83 include/libpc/LasWriter.hpp
--- a/include/libpc/LasWriter.hpp Mon Feb 07 11:32:25 2011 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/******************************************************************************
-* Copyright (c) 2011, Michael P. Gerlek (mpg at flaxen.com)
-*
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following
-* conditions are met:
-*
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in
-* the documentation and/or other materials provided
-* with the distribution.
-* * Neither the name of Hobu, Inc. or Flaxen Geo Consulting nor the
-* names of its contributors may be used to endorse or promote
-* products derived from this software without specific prior
-* written permission.
-*
More information about the Liblas-commits
mailing list