MrSID Decode SDK for LiDAR Reference Manual  1.1.4.4709
PointReader.h
Go to the documentation of this file.
1 /* //////////////////////////////////////////////////////////////////////////
2 // //
3 // This code is Copyright (c) 2008-2010 LizardTech, Inc, 1008 Western //
4 // Avenue, Suite 200, Seattle, WA 98104. Unauthorized use or distribution //
5 // prohibited. Access to and use of this code is permitted only under //
6 // license from LizardTech, Inc. Portions of the code are protected by //
7 // US and foreign patents and other filings. All Rights Reserved. //
8 // //
10 /* PUBLIC */
11 
12 #ifndef __LIDAR_POINT_READER_H__
13 #define __LIDAR_POINT_READER_H__
14 
15 #include "lidar/PointSource.h"
16 #include "lidar/IO.h"
17 
18 LT_BEGIN_LIDAR_NAMESPACE
19 
20 
27 class PointReader : public PointSource
28 {
29  ABSTRACT_OBJECT(PointReader);
30 public:
31  const PointInfo &getPointInfo(void) const;
32 
33  count_type getNumPoints(void) const;
34  const char *getWKT(void) const;
35 
36  /*
37  * Override the WKT stored in the file.
38  *
39  * This method alows the caller to override the WKT store in the file. This
40  * useful when the file does not have a WKT.
41  */
42  void overrideWKT(const char *wkt);
43 
51  virtual const char *getFileFormatString(void) const = 0;
52 
53  const Bounds &getBounds(void) const;
54  const double *getScale(void) const;
55  const double *getOffset(void) const;
56 
57  char const * const *getClassIdNames(void) const;
58  size_t getNumClassIdNames(void) const;
59 
60  double getTotalWork(const Bounds &bounds, double fraction) const;
61 
62 protected:
73  void setPointInfo(const PointInfo &pointInfo);
84  void setNumPoints(count_type numPoints);
95  void setBounds(const Bounds &bounds);
106  void setWKT(const char *wkt);
120  void setQuantization(const double scale[3], const double offset[3]);
121 
122 private:
123  PointInfo m_pointInfo;
124  count_type m_numPoints;
125  char *m_wkt;
126  Bounds m_bounds;
127  double m_scale[3];
128  double m_offset[3];
129 protected:
131 };
132 
133 LT_END_LIDAR_NAMESPACE
134 #endif // __LIDAR_POINT_READER_H__
void setBounds(const Bounds &bounds)
Set the bounding box of the point cloud.
const char * getWKT(void) const
Get the spatial reference system.
count_type getNumPoints(void) const
Get the number of points.
const double * getScale(void) const
Get the quantization scale.
void setWKT(const char *wkt)
Set the spatial reference system.
bool m_ignoreNativeWKTMetadata
Definition: PointReader.h:130
const PointInfo & getPointInfo(void) const
Get the point information.
Bounds is a 3-dimensional bounding box.
Definition: Types.h:127
const Bounds & getBounds(void) const
Get the bounding box.
void overrideWKT(const char *wkt)
PointSource is the base class of LiDAR point cloud extraction pipeline.
Definition: PointSource.h:40
PointInfo is a group of ChannelInfo objects.
Definition: PointData.h:185
void setNumPoints(count_type numPoints)
Set the number of points in the point cloud.
const double * getOffset(void) const
Get the quantization offset.
size_t getNumClassIdNames(void) const
Get the number of classification names.
PointReader is the base class for reading LiDAR file formats.
Definition: PointReader.h:27
virtual const char * getFileFormatString(void) const =0
Get the file type and version.
void setQuantization(const double scale[3], const double offset[3])
Set the quantization scale and offset.
double getTotalWork(const Bounds &bounds, double fraction) const
Get the amount of work needed to decode bounds.
lt_int64 count_type
Definition: PointSource.h:44
char const *const * getClassIdNames(void) const
Get the classification names.
void setPointInfo(const PointInfo &pointInfo)
Set the point information.

LizardTech