MrSID Decode SDK for LiDAR Reference Manual  1.1.2.4045
SimplePointWriter Class Referenceabstract

SimplePointWriter handles some of the bookkeeping of writing a file. More...

#include <SimplePointWriter.h>

Inheritance diagram for SimplePointWriter:
PointWriter Object TXTPointWriter

Public Member Functions

void setQuantization (const double scale[3], const double offset[3])
 Set the quantization. More...
 
const double * getScale (void) const
 Get the quantization scale. More...
 
const double * getOffset (void) const
 Get the quantization offset. More...
 
count_type write (const Bounds &bounds, double fraction, const PointInfo &pointInfo, ProgressDelegate *delegate)
 
virtual void writeBegin (const PointInfo &pointInfo)=0
 Begin writing the file. More...
 
virtual void writePoints (const PointData &points, size_t numPoints, ProgressDelegate *delegate)=0
 Write a set of points. More...
 
virtual void writeEnd (PointSource::count_type numPoints, const Bounds &bounds)=0
 Finish writing the file. More...
 
- Public Member Functions inherited from PointWriter
void setMetadata (const Metadata &metadata)
 Set the metadata. More...
 
MetadatagetMetadata (void)
 Get the Metadata. More...
 
void setChunckSize (size_t size)
 
- Public Member Functions inherited from Object
void retain (void) const
 Increment the reference count by one. More...
 
void release (void) const
 Decrement the reference count by one. More...
 

Protected Member Functions

virtual double getTotalWork (const Bounds &bounds, double fraction) const
 Get the amount of work needed to write the file. More...
 
- Protected Member Functions inherited from PointWriter
void init (const PointSource *src)
 Initalize the object. More...
 
const PointSourcegetSrc (void) const
 Get the input PointSource. More...
 
void groomMetadata (const Bounds &bounds, double fraction)
 Remove metadata that is inappropriate for the given bounds and fraction. More...
 
size_t getChunckSize (void) const
 
- Protected Member Functions inherited from Object
 Object (void)
 
virtual ~Object (void)
 

Protected Attributes

double m_offsets [3]
 
double m_scale [3]
 

Additional Inherited Members

- Public Types inherited from PointWriter
typedef PointSource::count_type count_type
 
- Static Protected Member Functions inherited from Object
static void * operator new (size_t size)
 Overide new so all Objects use ALLOC() More...
 
static void operator delete (void *ptr)
 Overide delete so all Objects use DEALLOC() More...
 

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
protectedvirtual

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:

LizardTech