MrSID Decode SDK for LiDAR Reference Manual  1.1.3.4427
PointReader.h
Go to the documentation of this file.
00001 /* //////////////////////////////////////////////////////////////////////////
00002 //                                                                         //
00003 // This code is Copyright (c) 2008-2010 LizardTech, Inc, 1008 Western      //
00004 // Avenue, Suite 200, Seattle, WA 98104.  Unauthorized use or distribution //
00005 // prohibited.  Access to and use of this code is permitted only under     //
00006 // license from LizardTech, Inc.  Portions of the code are protected by    //
00007 // US and foreign patents and other filings. All Rights Reserved.          //
00008 //                                                                         //
00010 /* PUBLIC */
00011 
00012 #ifndef __LIDAR_POINT_READER_H__
00013 #define __LIDAR_POINT_READER_H__
00014 
00015 #include "lidar/PointSource.h"
00016 #include "lidar/IO.h"
00017 
00018 LT_BEGIN_LIDAR_NAMESPACE
00019 
00020 
00027 class PointReader : public PointSource
00028 {
00029    ABSTRACT_OBJECT(PointReader);
00030 public:
00031    const PointInfo &getPointInfo(void) const;
00032 
00033    count_type getNumPoints(void) const;
00034    const char *getWKT(void) const;
00035 
00036    /*
00037     * Override the WKT stored in the file.
00038     *
00039     * This method alows the caller to override the WKT store in the file.  This
00040     * useful when the file does not have a WKT.
00041     */
00042    void overrideWKT(const char *wkt);
00043 
00051    virtual const char *getFileFormatString(void) const = 0;
00052 
00053    const Bounds &getBounds(void) const;
00054    const double *getScale(void) const;
00055    const double *getOffset(void) const;
00056 
00057    char const * const *getClassIdNames(void) const;
00058    size_t getNumClassIdNames(void) const;
00059 
00060    double getTotalWork(const Bounds &bounds, double fraction) const;
00061 
00062 protected:
00073    void setPointInfo(const PointInfo &pointInfo);
00084    void setNumPoints(count_type numPoints);
00095    void setBounds(const Bounds &bounds);
00106    void setWKT(const char *wkt);
00120    void setQuantization(const double scale[3], const double offset[3]);
00121 
00122 private:
00123    PointInfo m_pointInfo;
00124    count_type m_numPoints;
00125    char *m_wkt;
00126    Bounds m_bounds;
00127    double m_scale[3];
00128    double m_offset[3];
00129 protected:
00130    bool m_ignoreNativeWKTMetadata;
00131 };
00132 
00133 LT_END_LIDAR_NAMESPACE
00134 #endif // __LIDAR_POINT_READER_H__