MrSID Decode SDK for LiDAR Reference Manual 1.1.4.4709

- Main Page
- Classes
- Files

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

Public Types | Public Member Functions | List of all members
PointSource Class Referenceabstract

PointSource is the base class of LiDAR point cloud extraction pipeline. More...

`#include <PointSource.h>`

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

## Public Types
typedef lt_int64 | count_type

## Public Member Functions
virtual const PointInfo & | getPointInfo (void) const =0
| Get the point information. More...
size_t | getNumChannels (void) const
| Get the number of channels. More...
bool | hasChannel (const char *name) const
| Determine if there is a channel with a given name. More...
const ChannelInfo & | getChannel (size_t idx) const
| Access the channel info. More...
const ChannelInfo * | getChannel (const char *name) const
| Access the channel data. More...
virtual count_type | getNumPoints (void) const =0
| Get the number of points. More...
virtual const char * | getWKT (void) const =0
| Get the spatial reference system. More...
virtual void | loadMetadata (Metadata &metadata, bool sanitize) const =0
| Load the point clouds metadata. More...
virtual const Bounds & | getBounds (void) const =0
| Get the bounding box. More...
virtual const double * | getScale (void) const =0
| Get the quantization scale. More...
virtual const double * | getOffset (void) const =0
| Get the quantization offset. More...
virtual size_t | getNumClassIdNames (void) const =0
| Get the number of classification names. More...
virtual char const *const * | getClassIdNames (void) const =0
| Get the classification names. More...
virtual double | getTotalWork (const Bounds &bounds, double fraction) const =0
| Get the amount of work needed to decode bounds. More...
virtual PointIterator * | createIterator (const Bounds &bounds, double fraction, const PointInfo &pointInfo, ProgressDelegate *delegate) const =0
| Get a PointIterator for a given bounds. More...
size_t | read (const Bounds &bounds, PointData &points, ProgressDelegate *delegate) const
| Fill the point buffer with the best sample of the point cloud in bounds. 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...

## Additional Inherited Members
Protected Member Functions inherited from Object
| Object (void)
virtual | ~Object (void)

## Detailed Description

The PointSource class the base class for accessing LiDAR data. PointSource has two types of methods. The first class are methods that report bulk properties of the point cloud, such as number of points and number of channels. The second class of methods give access to the point cloud itself, see createIterator() and read().

Note
  All methods are const, so you should be able to use this Object on multiple threads at a time. The decode state lives in the PointIterator so only one thread can use a PointIterator.

See Also
  See examples/src/DumpMG4Info.cpp dumpHeader() for an example of accessing bulk properties of the point cloud.
  See examples/src/UserTutorial.cpp for examples of accessing the point cloud.

Definition at line 40 of file PointSource.h.

## Member Typedef Documentation

typedef lt_int64 PointSource::count_type

Definition at line 44 of file PointSource.h.

## Member Function Documentation

virtual PointIterator* PointSource::createIterator | ( | const Bounds & | bounds,
|  | double | fraction,
|  | const PointInfo & | pointInfo,
|  | ProgressDelegate * | delegate
| ) |  | const
| pure virtual

This methods returns a PointIterator for the given bounds.

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)
  channelInfo | the list of channels to be extracted
  numChannels | the number of channels to be extracted
  delegate | a ProgressDelegate for feedback (can be NULL)

Implemented in TXTPointReader, and MG4PointReader.

virtual const Bounds& PointSource::getBounds | ( | void | ) |  | const
| pure virtual

This method returns the geo bounding box of the point cloud.

Implemented in PointReader.

const ChannelInfo& PointSource::getChannel | ( | size_t | idx) |  | const

This method returns the ChannelInfo for a given index.

Parameters

  idx | the index of the wanted channel

Returns
  the channel info for the given channel

Note
  This method is equivalent to calling getPointInfo().getChannel(idx).

const ChannelInfo* PointSource::getChannel | ( | const char * | name) |  | const

This method returns the ChannelInfo for a given name.

Parameters

  name | the name of the wanted channel

Returns
  the channel data for the given channel

Note
  This method is equivalent to calling getPointInfo().getChannel(name).

virtual char const* const* PointSource::getClassIdNames | ( | void | ) |  | const
| pure virtual

This methods returns an array of classification names with length getNumClassIdNames().

Implemented in PointReader, and MG4PointReader.

size_t PointSource::getNumChannels | ( | void | ) |  | const

This method returns the channels. This method is equivalent to calling getPointInfo().getNumChannels().

virtual size_t PointSource::getNumClassIdNames | ( | void | ) |  | const
| pure virtual

This methods returns the number of classification names.

Implemented in PointReader, and MG4PointReader.

virtual count_type PointSource::getNumPoints | ( | void | ) |  | const
| pure virtual

This method returns the number of points in the point cloud.

Implemented in PointReader.

virtual const double* PointSource::getOffset | ( | void | ) |  | const
| pure 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.

Implemented in PointReader.

virtual const PointInfo& PointSource::getPointInfo | ( | void | ) |  | const
| pure virtual

This method returns a PointInfo object.

Implemented in PointReader.

virtual const double* PointSource::getScale | ( | void | ) |  | const
| pure 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.

Implemented in PointReader.

virtual double PointSource::getTotalWork | ( | const Bounds & | bounds,
|  | double | fraction
| ) |  | const
| pure virtual

This method returns the amount of work needed to decode the points in bounds. getTotalWork() is used with ProgressDelegate to track the progress of a decode or encode.

Parameters

  bounds | the region of interest
  fraction | the fraction of the points you want (use 1.0 for all the points and use 0.1 to keep every tenth point)

Returns
  the work needed to decode bounds

Implemented in TXTPointReader, PointReader, and MG4PointReader.

virtual const char* PointSource::getWKT | ( | void | ) |  | const
| pure virtual

This method returns the spatial reference system as a Well Known Text (WKT) string. If the PointSource does not have a spatial reference system it will return NULL.

Implemented in PointReader.

bool PointSource::hasChannel | ( | const char * | name) |  | const

The method determines if this source has a channel with the given name.

Parameters

  name | the channel name

Returns
  true if the channel was found

virtual void PointSource::loadMetadata | ( | Metadata & | metadata,
|  | bool | sanitize
| ) |  | const
| pure virtual

This method loads the metadata for the point cloud. PointSource only load metadata on demand to reduce memory usage.

Parameters

  metadata | The metadata object to fill.
  sanitize | If true remove vendor-specific metadata that we don't understand for example, Merrick::102 ("Index to page of point records")

Implemented in TXTPointReader, and MG4PointReader.

size_t PointSource::read | ( | const Bounds & | bounds,
|  | PointData & | points,
|  | ProgressDelegate * | delegate
| ) |  | const

Parameters

  bounds | the region of interest
  points | the destination point buffer
  delegate | a ProgressDelegate for feedback (can be NULL)

Returns
  the number of points written into the destination point buffer

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

- PointSource.h

LizardTech