MrSID Decode SDK for LiDAR Reference Manual  1.1.4.4709
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 
114  virtual bool supportedChannels(const PointInfo &inputPointInfo,
115  PointInfo &supportedPointInfo) const = 0;
116 
117 protected:
123  void init(const PointSource *src);
124 
130  const PointSource *getSrc(void) const;
131 
138  void groomMetadata(const Bounds &bounds, double fraction);
139 
140  size_t getChunckSize(void) const;
141 
142 private:
143  const PointSource *m_src;
144  Metadata m_metadata;
145  size_t m_chunckSize;
146 };
147 
148 LT_END_LIDAR_NAMESPACE
149 #endif // __LIDAR_POINT_WRITER_H__
void setChunckSize(size_t size)
virtual void setQuantization(const double scale[3], const double offset[3])=0
Set the quantization.
virtual count_type write(const Bounds &bounds, double fraction, const PointInfo &pointInfo, ProgressDelegate *delegate)=0
Write out the point cloud.
virtual const double * getScale(void) const =0
Get the quantization scale.
virtual bool supportedChannels(const PointInfo &inputPointInfo, PointInfo &supportedPointInfo) const =0
Remove the unsupported channels.
PointInfo is a group of ChannelInfo objects.
Definition: PointData.h:185
virtual const double * getOffset(void) const =0
Get the quantization offset.
Metadata is a container for storing metadata about the point cloud.
Definition: Metadata.h:64
PointSource::count_type count_type
Definition: PointWriter.h:28
void init(const PointSource *src)
Initalize the object.
PointSource is the base class of LiDAR point cloud extraction pipeline.
Definition: PointSource.h:40
size_t getChunckSize(void) const
Bounds is a 3-dimensional bounding box.
Definition: Types.h:127
Object is the base class for implementing reference counting.
Definition: Object.h:34
void groomMetadata(const Bounds &bounds, double fraction)
Remove metadata that is inappropriate for the given bounds and fraction.
ProgressDelegate is the base class for progress and interrupt reporting.
lt_int64 count_type
Definition: PointSource.h:44
PointWriter is the base for writing LiDAR files.
Definition: PointWriter.h:24
void setMetadata(const Metadata &metadata)
Set the metadata.
const PointSource * getSrc(void) const
Get the input PointSource.
Metadata & getMetadata(void)
Get the Metadata.

LizardTech