MrSID Decode SDK for LiDAR Reference Manual  1.1.4.4709
SimplePointWriter.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_SIMPLE_POINT_WRITER_H__
13 #define __LIDAR_SIMPLE_POINT_WRITER_H__
14 
15 #include "lidar/PointWriter.h"
16 
17 LT_BEGIN_LIDAR_NAMESPACE
18 
23 {
24  ABSTRACT_OBJECT(SimplePointWriter);
25 public:
26  void setQuantization(const double scale[3], const double offset[3]);
27 
28  const double *getScale(void) const;
29  const double *getOffset(void) const;
30 
36  count_type write(const Bounds &bounds,
37  double fraction,
38  const PointInfo &pointInfo,
39  ProgressDelegate *delegate);
40 
49  virtual void writeBegin(const PointInfo &pointInfo) = 0;
59  virtual void writePoints(const PointData &points,
60  size_t numPoints,
61  ProgressDelegate *delegate) = 0;
62 
74  virtual void writeEnd(PointSource::count_type numPoints,
75  const Bounds &bounds) = 0;
76 
77 protected:
91  virtual double getTotalWork(const Bounds &bounds,
92  double fraction) const;
93 
94  double m_offsets[3];
95  double m_scale[3];
96 };
97 
98 LT_END_LIDAR_NAMESPACE
99 #endif // __LIDAR_SIMPLE_POINT_WRITER_H__
100 
virtual void writePoints(const PointData &points, size_t numPoints, ProgressDelegate *delegate)=0
Write a set of points.
const double * getScale(void) const
Get the quantization scale.
virtual double getTotalWork(const Bounds &bounds, double fraction) const
Get the amount of work needed to write the file.
PointInfo is a group of ChannelInfo objects.
Definition: PointData.h:185
SimplePointWriter handles some of the bookkeeping of writing a file.
PointSource::count_type count_type
Definition: PointWriter.h:28
virtual void writeBegin(const PointInfo &pointInfo)=0
Begin writing the file.
Bounds is a 3-dimensional bounding box.
Definition: Types.h:127
PointData is a group of ChannelData objects.
Definition: PointData.h:427
ProgressDelegate is the base class for progress and interrupt reporting.
count_type write(const Bounds &bounds, double fraction, const PointInfo &pointInfo, ProgressDelegate *delegate)
lt_int64 count_type
Definition: PointSource.h:44
PointWriter is the base for writing LiDAR files.
Definition: PointWriter.h:24
void setQuantization(const double scale[3], const double offset[3])
Set the quantization.
const double * getOffset(void) const
Get the quantization offset.
virtual void writeEnd(PointSource::count_type numPoints, const Bounds &bounds)=0
Finish writing the file.

LizardTech