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 Attributes | List of all members
MG4PointReader Class Reference

MG4PointReader reads LiDAR-based MrSID files. More...

`#include <MG4PointReader.h>`

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

## Public Member Functions
void | init (const char *path)
| Initalize with a filename. More...
void | init (IO *io)
| Initalize with a IO object. More...
void | loadMetadata (Metadata &metadata, bool sanitize) const
| Load the point clouds metadata. More...
char const *const * | getClassIdNames (void) const
| Get the classification names. More...
size_t | getNumClassIdNames (void) const
| Get the number of classification names. More...
const char * | getFileFormatString (void) const
| Get the file type and version. More...
double | getTotalWork (const Bounds &bounds, double fraction) const
| Get the amount of work needed to decode bounds. More...
PointIterator * | createIterator (const Bounds &bounds, double fraction, const PointInfo &pointInfo, ProgressDelegate *delegate) const
| Get a PointIterator for a given bounds. More...
Public Member Functions inherited from PointReader
const PointInfo & | getPointInfo (void) const
| Get the point information. More...
count_type | getNumPoints (void) const
| Get the number of points. More...
const char * | getWKT (void) const
| Get the spatial reference system. More...
void | overrideWKT (const char *wkt)
const Bounds & | getBounds (void) const
| Get the bounding box. More...
const double * | getScale (void) const
| Get the quantization scale. More...
const double * | getOffset (void) const
| Get the quantization offset. More...
char const *const * | getClassIdNames (void) const
| Get the classification names. More...
size_t | getNumClassIdNames (void) const
| Get the number of classification names. More...
double | getTotalWork (const Bounds &bounds, double fraction) const
| Get the amount of work needed to decode bounds. More...
Public Member Functions inherited from PointSource
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...
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...

## Protected Attributes
char | m_version [32]
WaveletDecoderInfo * | m_waveletInfo
IO::Location | m_metadata
char ** | m_classId
size_t | m_numClasses
bool | m_mergingFloats
Protected Attributes inherited from PointReader
bool | m_ignoreNativeWKTMetadata

## Additional Inherited Members
Public Types inherited from PointSource
typedef lt_int64 | count_type
Protected Member Functions inherited from PointReader
void | setPointInfo (const PointInfo &pointInfo)
| Set the point information. More...
void | setNumPoints (count_type numPoints)
| Set the number of points in the point cloud. More...
void | setBounds (const Bounds &bounds)
| Set the bounding box of the point cloud. More...
void | setWKT (const char *wkt)
| Set the spatial reference system. More...
void | setQuantization (const double scale[3], const double offset[3])
| Set the quantization scale and offset. More...

## Detailed Description

The MG4PointReader class reads MrSID files that contain LiDAR data.

See Also
  See examples/src/DecodeMG4ToTXT.cpp and examples/src/UserTutorial.cpp for examples on reading MG4 files.

Definition at line 30 of file MG4PointReader.h.

## Member Function Documentation

PointIterator* MG4PointReader::createIterator | ( | const Bounds & | bounds,
|  | double | fraction,
|  | const PointInfo & | pointInfo,
|  | ProgressDelegate * | delegate
| ) |  | const
| 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)

Implements PointSource.

char const* const* MG4PointReader::getClassIdNames | ( | void | ) |  | const
| virtual

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

Implements PointSource.

const char* MG4PointReader::getFileFormatString | ( | void | ) |  | const
| virtual

This method returns a string the contains the File Type and version of the PointReader. For example for a MrSID file this will will return "MG4 4.0.0.1".

Implements PointReader.

size_t MG4PointReader::getNumClassIdNames | ( | void | ) |  | const
| virtual

This methods returns the number of classification names.

Implements PointSource.

double MG4PointReader::getTotalWork | ( | const Bounds & | bounds,
|  | double | fraction
| ) |  | const
| 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

Implements PointSource.

void MG4PointReader::init | ( | const char * | path) |  |

This method initalizes the reader with a filename.

Parameters

  path | the filename

void MG4PointReader::init | ( | IO * | io) |  |

This method initalizes the reader with a IO object.

Parameters

  io | the data source

void MG4PointReader::loadMetadata | ( | Metadata & | metadata,
|  | bool | sanitize
| ) |  | const
| 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")

Implements PointSource.

## Member Data Documentation

char** MG4PointReader::m_classId
| protected

Definition at line 69 of file MG4PointReader.h.

bool MG4PointReader::m_mergingFloats
| protected

Definition at line 71 of file MG4PointReader.h.

IO::Location MG4PointReader::m_metadata
| protected

Definition at line 68 of file MG4PointReader.h.

size_t MG4PointReader::m_numClasses
| protected

Definition at line 70 of file MG4PointReader.h.

char MG4PointReader::m_version[32]
| protected

Definition at line 65 of file MG4PointReader.h.

WaveletDecoderInfo* MG4PointReader::m_waveletInfo
| protected

Definition at line 67 of file MG4PointReader.h.

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

- MG4PointReader.h

LizardTech