MrSID Decode SDK for LiDAR Reference Manual  1.1.4.4709
PointWriter.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_WRITER_H__
00013 #define __LIDAR_POINT_WRITER_H__
00014 
00015 #include "lidar/PointSource.h"
00016 
00017 LT_BEGIN_LIDAR_NAMESPACE
00018 
00024 class PointWriter : public Object
00025 {
00026    ABSTRACT_OBJECT(PointWriter);
00027 public:
00028    typedef PointSource::count_type count_type;
00029    
00030    
00039    void setMetadata(const Metadata &metadata);
00040    
00047    Metadata &getMetadata(void);
00048 
00061    virtual void setQuantization(const double scale[3], const double offset[3]) = 0;
00062 
00072    virtual const double *getScale(void) const = 0;
00082    virtual const double *getOffset(void) const = 0;
00083 
00097    virtual count_type write(const Bounds &bounds,
00098                             double fraction,
00099                             const PointInfo &pointInfo,
00100                             ProgressDelegate *delegate) = 0;
00101 
00102    void setChunckSize(size_t size);
00103 
00104 
00114    virtual bool supportedChannels(const PointInfo &inputPointInfo,
00115                                   PointInfo &supportedPointInfo) const = 0;
00116 
00117 protected:
00123    void init(const PointSource *src);
00124 
00130    const PointSource *getSrc(void) const;
00131    
00138    void groomMetadata(const Bounds &bounds, double fraction);
00139 
00140    size_t getChunckSize(void) const;
00141 
00142 private:
00143    const PointSource *m_src;
00144    Metadata m_metadata;
00145    size_t m_chunckSize;
00146 };
00147 
00148 LT_END_LIDAR_NAMESPACE
00149 #endif // __LIDAR_POINT_WRITER_H__