MrSID Decode SDK for LiDAR Reference Manual  1.1.3.4427
PointWriter.h
Go to the documentation of this file.
1 /* //////////////////////////////////////////////////////////////////////////
2 // //
3 // This code is Copyright (c) 2008-2010 LizardTech, Inc, 1008 Western //
4 // Avenue, Suite 200, Seattle, WA 98104. Unauthorized use or distribution //
5 // prohibited. Access to and use of this code is permitted only under //
6 // license from LizardTech, Inc. Portions of the code are protected by //
7 // US and foreign patents and other filings. All Rights Reserved. //
8 // //
10 /* PUBLIC */
11 
12 #ifndef __LIDAR_POINT_WRITER_H__
13 #define __LIDAR_POINT_WRITER_H__
14 
15 #include "lidar/PointSource.h"
16 
17 LT_BEGIN_LIDAR_NAMESPACE
18 
24 class PointWriter : public Object
25 {
26  ABSTRACT_OBJECT(PointWriter);
27 public:
29 
30 
39  void setMetadata(const Metadata &metadata);
40 
47  Metadata &getMetadata(void);
48 
61  virtual void setQuantization(const double scale[3], const double offset[3]) = 0;
62 
72  virtual const double *getScale(void) const = 0;
82  virtual const double *getOffset(void) const = 0;
83 
97  virtual count_type write(const Bounds &bounds,
98  double fraction,
99  const PointInfo &pointInfo,
100  ProgressDelegate *delegate) = 0;
101 
102  void setChunckSize(size_t size);
103 
104 protected:
110  void init(const PointSource *src);
111 
117  const PointSource *getSrc(void) const;
118 
125  void groomMetadata(const Bounds &bounds, double fraction);
126 
127  size_t getChunckSize(void) const;
128 
129 private:
130  const PointSource *m_src;
131  Metadata m_metadata;
132  size_t m_chunckSize;
133 };
134 
135 LT_END_LIDAR_NAMESPACE
136 #endif // __LIDAR_POINT_WRITER_H__

LizardTech