MrSID Decode SDK for LiDAR Reference Manual  1.1.4.4709
SimplePointWriter Class Reference

SimplePointWriter handles some of the bookkeeping of writing a file.

#include <SimplePointWriter.h>

Inheritance diagram for SimplePointWriter:
PointWriter Object TXTPointWriter

List of all members.

Public Member Functions

void setQuantization (const double scale[3], const double offset[3])
 Set the quantization.
const double * getScale (void) const
 Get the quantization scale.
const double * getOffset (void) const
 Get the quantization offset.
count_type write (const Bounds &bounds, double fraction, const PointInfo &pointInfo, ProgressDelegate *delegate)
virtual void writeBegin (const PointInfo &pointInfo)=0
 Begin writing the file.
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.

Protected Member Functions

virtual double getTotalWork (const Bounds &bounds, double fraction) const
 Get the amount of work needed to write the file.

Protected Attributes

double m_offsets [3]
double m_scale [3]

Detailed Description

Definition at line 22 of file SimplePointWriter.h.


Member Function Documentation

const double* SimplePointWriter::getOffset ( void  ) const [virtual]

This method returns the quantization offset for X, Y, and Z channels. It returns NULL then the point cloud is not quantized or quantization is unknown.

Note:
By default this will be the same as the PointSources' offset.

Implements PointWriter.

const double* SimplePointWriter::getScale ( void  ) const [virtual]

This method returns the quantization scale factors for X, Y, and Z channels. It returns NULL then the point cloud is not quantized or quantization is unknown.

Note:
By default this will be the same as the PointSources' scale.

Implements PointWriter.

virtual double SimplePointWriter::getTotalWork ( const Bounds bounds,
double  fraction 
) const [protected, virtual]

This method returns the work needed to wirte the file.

Parameters:
boundsthe region of interest (HUGE_VAL are handled)
fractionthe fraction of the points you want (use 1.0 for all the points and use 0.1 to keep every tenth point)
Note:
This value does not include the work needed to read the source points.
void SimplePointWriter::setQuantization ( const double  scale[3],
const double  offset[3] 
) [virtual]

This method set the output files quantization values.

Parameters:
scalethe quantization scale factor (may be NULL)
offsetthe quantization offset (may be NULL)
Note:
Some file format requier quantization, so make sure you call this if needed.
The default values are the input PointSource values.

Implements PointWriter.

count_type SimplePointWriter::write ( const Bounds bounds,
double  fraction,
const PointInfo pointInfo,
ProgressDelegate delegate 
) [virtual]
Note:
this write() implements creating the PointIterator and reading the point cloud. Calls writeBegin(), writePoints(), and writeEnd() as needed.

Implements PointWriter.

virtual void SimplePointWriter::writeBegin ( const PointInfo pointInfo) [pure virtual]

This method is called to start writing file.

Parameters:
channelInfoan array describing which channels are being saved
numChannelsthe number of channels

Implemented in TXTPointWriter.

virtual void SimplePointWriter::writeEnd ( PointSource::count_type  numPoints,
const Bounds bounds 
) [pure virtual]

This method is called when no more points are left.

Parameters:
numPointsthe total number of points written
boundsthe tight boundsing box the points
Note:
On faliure writeEnd() is called with numPoints = 0 and bounds = Bounds::Huge()

Implemented in TXTPointWriter.

virtual void SimplePointWriter::writePoints ( const PointData points,
size_t  numPoints,
ProgressDelegate delegate 
) [pure virtual]

This method is called when points need to be written.

Parameters:
pointsthe points to be written
numPointsthe number of points to write
delegetethe progress delegete to be updated (can be NULL)

Implemented in TXTPointWriter.


Member Data Documentation

double SimplePointWriter::m_offsets[3] [protected]

Definition at line 94 of file SimplePointWriter.h.

double SimplePointWriter::m_scale[3] [protected]

Definition at line 95 of file SimplePointWriter.h.


The documentation for this class was generated from the following file: