MrSID Decode SDK for LiDAR Reference Manual  1.1.5.5244
PointWriter.h
Go to the documentation of this file.
1 //
2 // This code is property of Celartem, Inc dba Extensis.
3 // Copyright (c) 1995-2023. All rights reserved.
4 // Use permitted only under license from Extensis.
5 //
6 /* PUBLIC */
7 
8 #ifndef __LIDAR_POINT_WRITER_H__
9 #define __LIDAR_POINT_WRITER_H__
10 
11 #include "lidar/PointSource.h"
12 
13 LT_BEGIN_LIDAR_NAMESPACE
14 
20 class PointWriter : public Object
21 {
22  ABSTRACT_OBJECT(PointWriter);
23 public:
25 
26 
35  void setMetadata(const Metadata &metadata);
36 
44 
57  virtual void setQuantization(const double scale[3], const double offset[3]) = 0;
58 
68  virtual const double *getScale(void) const = 0;
78  virtual const double *getOffset(void) const = 0;
79 
93  virtual count_type write(const Bounds &bounds,
94  double fraction,
95  const PointInfo &pointInfo,
96  ProgressDelegate *delegate) = 0;
97 
98  void setChunckSize(size_t size);
99 
100 
110  virtual bool supportedChannels(const PointInfo &inputPointInfo,
111  PointInfo &supportedPointInfo) const = 0;
112 
113 protected:
119  void init(const PointSource *src);
120 
126  const PointSource *getSrc(void) const;
127 
134  void groomMetadata(const Bounds &bounds, double fraction);
135 
136  size_t getChunckSize(void) const;
137 
138 private:
139  const PointSource *m_src;
140  Metadata m_metadata;
141  size_t m_chunckSize;
142 };
143 
144 LT_END_LIDAR_NAMESPACE
145 #endif // __LIDAR_POINT_WRITER_H__
Metadata is a container for storing metadata about the point cloud.
Definition: Metadata.h:61
Object is the base class for implementing reference counting.
Definition: Object.h:31
PointInfo is a group of ChannelInfo objects.
Definition: PointData.h:182
PointSource is the base class of LiDAR point cloud extraction pipeline.
Definition: PointSource.h:37
lt_int64 count_type
Definition: PointSource.h:40
PointWriter is the base for writing LiDAR files.
Definition: PointWriter.h:21
virtual const double * getOffset(void) const =0
Get the quantization offset.
void setMetadata(const Metadata &metadata)
Set the metadata.
void groomMetadata(const Bounds &bounds, double fraction)
Remove metadata that is inappropriate for the given bounds and fraction.
Metadata & getMetadata(void)
Get the Metadata.
const PointSource * getSrc(void) const
Get the input PointSource.
PointSource::count_type count_type
Definition: PointWriter.h:24
size_t getChunckSize(void) const
virtual bool supportedChannels(const PointInfo &inputPointInfo, PointInfo &supportedPointInfo) const =0
Remove the unsupported channels.
virtual void setQuantization(const double scale[3], const double offset[3])=0
Set the quantization.
virtual const double * getScale(void) const =0
Get the quantization scale.
virtual count_type write(const Bounds &bounds, double fraction, const PointInfo &pointInfo, ProgressDelegate *delegate)=0
Write out the point cloud.
void setChunckSize(size_t size)
void init(const PointSource *src)
Initalize the object.
ProgressDelegate is the base class for progress and interrupt reporting.
Bounds is a 3-dimensional bounding box.
Definition: Types.h:124

Extensis