MrSID Decode SDK for LiDAR Reference Manual 1.1.4.4709

- Main Page
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SimplePointWriter Class Referenceabstract

SimplePointWriter handles some of the bookkeeping of writing a file.

`#include <SimplePointWriter.h>`

Inheritance diagram for SimplePointWriter:
[legend]
Collaboration diagram for SimplePointWriter:
[legend]

## 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...
Metadata & | getMetadata (void)
| Get the Metadata. More...
void | setChunckSize (size_t size)
virtual bool | supportedChannels (const PointInfo &inputPointInfo, PointInfo &supportedPointInfo) const =0
| Remove the unsupported channels. More...
Public Member Functions inherited from Object
int | retain (void) const
| Increment the reference count by one. More...
int | 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 PointSource * | getSrc (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

## 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

  bounds | the region of interest (HUGE_VAL are handled)
  fraction | the 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

  scale | the quantization scale factor (may be NULL)
  offset | the 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

  channelInfo | an array describing which channels are being saved
  numChannels | the 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

  numPoints | the total number of points written
  bounds | the 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

  points | the points to be written
  numPoints | the number of points to write
  delegete | the 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:

- SimplePointWriter.h

LizardTech