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__
PointWriter is the base for writing LiDAR files.
Definition: PointWriter.h:24
Metadata is a container for storing metadata about the point cloud.
Definition: Metadata.h:64
virtual count_type write(const Bounds &bounds, double fraction, const PointInfo &pointInfo, ProgressDelegate *delegate)=0
Write out the point cloud.
Bounds is a 3-dimensional bounding box.
Definition: Types.h:127
void setMetadata(const Metadata &metadata)
Set the metadata.
virtual const double * getOffset(void) const =0
Get the quantization offset.
ProgressDelegate is the base class for progress and interrupt reporting.
PointSource is the base class of LiDAR point cloud extraction pipeline.
Definition: PointSource.h:40
virtual void setQuantization(const double scale[3], const double offset[3])=0
Set the quantization.
PointInfo is a group of ChannelInfo objects.
Definition: PointData.h:181
virtual const double * getScale(void) const =0
Get the quantization scale.
size_t getChunckSize(void) const
void groomMetadata(const Bounds &bounds, double fraction)
Remove metadata that is inappropriate for the given bounds and fraction.
Object is the base class for implementing reference counting.
Definition: Object.h:34
PointSource::count_type count_type
Definition: PointWriter.h:28
const PointSource * getSrc(void) const
Get the input PointSource.
void setChunckSize(size_t size)
Metadata & getMetadata(void)
Get the Metadata.
lt_int64 count_type
Definition: PointSource.h:44
void init(const PointSource *src)
Initalize the object.

LizardTech