MrSID Decode SDK for LiDAR Reference Manual  1.1.4.4709
MG4PointReader Class Reference

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

#include <MG4PointReader.h>

Inheritance diagram for MG4PointReader:
PointReader PointSource Object

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...
 
PointIteratorcreateIterator (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 PointInfogetPointInfo (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 BoundsgetBounds (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 ChannelInfogetChannel (size_t idx) const
 Access the channel info. More...
 
const ChannelInfogetChannel (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...
 
- Protected Member Functions inherited from Object
 Object (void)
 
virtual ~ Object (void)
 

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

§ createIterator()

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
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)
channelInfothe list of channels to be extracted
numChannelsthe number of channels to be extracted
delegatea ProgressDelegate for feedback (can be NULL)

Implements PointSource.

§ getClassIdNames()

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

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

Implements PointSource.

§ getFileFormatString()

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.

§ getNumClassIdNames()

size_t MG4PointReader::getNumClassIdNames ( void  ) const
virtual

This methods returns the number of classification names.

Implements PointSource.

§ getTotalWork()

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
boundsthe region of interest
fractionthe 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.

§ init() [1/2]

void MG4PointReader::init ( const char *  path)

This method initalizes the reader with a filename.

Parameters
paththe filename

§ init() [2/2]

void MG4PointReader::init ( IO io)

This method initalizes the reader with a IO object.

Parameters
iothe data source

§ loadMetadata()

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
metadataThe metadata object to fill.
sanitizeIf 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

§ m_classId

char** MG4PointReader::m_classId
protected

Definition at line 69 of file MG4PointReader.h.

§ m_mergingFloats

bool MG4PointReader::m_mergingFloats
protected

Definition at line 71 of file MG4PointReader.h.

§ m_metadata

IO::Location MG4PointReader::m_metadata
protected

Definition at line 68 of file MG4PointReader.h.

§ m_numClasses

size_t MG4PointReader::m_numClasses
protected

Definition at line 70 of file MG4PointReader.h.

§ m_version

char MG4PointReader::m_version[32]
protected

Definition at line 65 of file MG4PointReader.h.

§ m_waveletInfo

WaveletDecoderInfo* MG4PointReader::m_waveletInfo
protected

Definition at line 67 of file MG4PointReader.h.


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

LizardTech