MrSID Decode SDK for LiDAR Reference Manual  1.1.5.5244
SimplePointWriter.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_SIMPLE_POINT_WRITER_H__
9 #define __LIDAR_SIMPLE_POINT_WRITER_H__
10 
11 #include "lidar/PointWriter.h"
12 
13 LT_BEGIN_LIDAR_NAMESPACE
14 
19 {
20  ABSTRACT_OBJECT(SimplePointWriter);
21 public:
22  void setQuantization(const double scale[3], const double offset[3]);
23 
24  const double *getScale(void) const;
25  const double *getOffset(void) const;
26 
32  count_type write(const Bounds &bounds,
33  double fraction,
34  const PointInfo &pointInfo,
35  ProgressDelegate *delegate);
36 
45  virtual void writeBegin(const PointInfo &pointInfo) = 0;
55  virtual void writePoints(const PointData &points,
56  size_t numPoints,
57  ProgressDelegate *delegate) = 0;
58 
70  virtual void writeEnd(PointSource::count_type numPoints,
71  const Bounds &bounds) = 0;
72 
73 protected:
87  virtual double getTotalWork(const Bounds &bounds,
88  double fraction) const;
89 
90  double m_offsets[3];
91  double m_scale[3];
92 };
93 
94 LT_END_LIDAR_NAMESPACE
95 #endif // __LIDAR_SIMPLE_POINT_WRITER_H__
96 
PointInfo is a group of ChannelInfo objects.
Definition: PointData.h:182
PointData is a group of ChannelData objects.
Definition: PointData.h:433
lt_int64 count_type
Definition: PointSource.h:40
PointWriter is the base for writing LiDAR files.
Definition: PointWriter.h:21
PointSource::count_type count_type
Definition: PointWriter.h:24
ProgressDelegate is the base class for progress and interrupt reporting.
SimplePointWriter handles some of the bookkeeping of writing a file.
virtual double getTotalWork(const Bounds &bounds, double fraction) const
Get the amount of work needed to write the file.
count_type write(const Bounds &bounds, double fraction, const PointInfo &pointInfo, ProgressDelegate *delegate)
virtual void writeBegin(const PointInfo &pointInfo)=0
Begin writing the file.
const double * getOffset(void) const
Get the quantization offset.
void setQuantization(const double scale[3], const double offset[3])
Set the quantization.
const double * getScale(void) const
Get the quantization scale.
virtual void writePoints(const PointData &points, size_t numPoints, ProgressDelegate *delegate)=0
Write a set of points.
virtual void writeEnd(PointSource::count_type numPoints, const Bounds &bounds)=0
Finish writing the file.
Bounds is a 3-dimensional bounding box.
Definition: Types.h:124

Extensis