MrSID Decode SDK for LiDAR Reference Manual  1.1.4.4709
TXTPointReader.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_TXT_POINT_READER_H__
13 #define __LIDAR_TXT_POINT_READER_H__
14 
15 #include "lidar/PointReader.h"
16 #include "lidar/IO.h"
17 
18 LT_BEGIN_LIDAR_NAMESPACE
19 
27 {
28  CONCRETE_OBJECT(TXTPointReader);
29 public:
30 
42  void init(const char *path, const char *format,
43  size_t header, bool doFullInit);
55  void init(IO *io, const char *format,
56  size_t header, bool doFullInit);
57 
70  void init(const char *path, const PointInfo &fieldInfo,
71  size_t header, bool doFullInit);
84  void init(IO *io, const PointInfo &fieldInfo,
85  size_t header, bool doFullInit);
86 
95  void initBoundsAndNumPoints(void);
96 
97  const char *getFileFormatString(void) const;
98 
99  void loadMetadata(Metadata &metadata, bool sanitize) const;
100 
101  double getTotalWork(const Bounds &bounds, double fraction) const;
102 
103  PointIterator *createIterator(const Bounds &bounds,
104  double fraction,
105  const PointInfo &pointInfo,
106  ProgressDelegate *delegate) const;
107 
136  static void parseFormat(const char *format,
137  PointInfo &fieldInfo);
148  static void parseFormat(const char *format,
149  PointInfo &fieldInfo,
150  const PointInfo &pointInfo);
151 
178  static void parseQuantization(const char *format,
179  PointInfo &fieldInfo);
180 
181 
182 protected:
183  void setBoundsAndNumPoints(bool doFullInit);
184 
186  size_t m_header;
188  double m_totalWork;
189 
190  class Iterator;
191 };
192 
193 LT_END_LIDAR_NAMESPACE
194 #endif // __LIDAR_TXT_POINT_READER_H__
double getTotalWork(const Bounds &bounds, double fraction) const
Get the amount of work needed to decode bounds.
TXTPointReader reads LiDAR-based Text files.
const char * getFileFormatString(void) const
Get the file type and version.
void loadMetadata(Metadata &metadata, bool sanitize) const
Load the point clouds metadata.
IO is the base class for binary input and output.
Definition: IO.h:29
PointInfo m_fieldInfo
static void parseQuantization(const char *format, PointInfo &fieldInfo)
Update the quantization values of a PointInfo.
PointIterator is the base class for accessing the point cloud.
Definition: PointIterator.h:31
PointInfo is a group of ChannelInfo objects.
Definition: PointData.h:185
Metadata is a container for storing metadata about the point cloud.
Definition: Metadata.h:64
PointIterator * createIterator(const Bounds &bounds, double fraction, const PointInfo &pointInfo, ProgressDelegate *delegate) const
Get a PointIterator for a given bounds.
Bounds is a 3-dimensional bounding box.
Definition: Types.h:127
void init(const char *path, const char *format, size_t header, bool doFullInit)
Initialize with filename and format string.
void initBoundsAndNumPoints(void)
Setup the bounds and number of points.
ProgressDelegate is the base class for progress and interrupt reporting.
PointReader is the base class for reading LiDAR file formats.
Definition: PointReader.h:27
void setBoundsAndNumPoints(bool doFullInit)
static void parseFormat(const char *format, PointInfo &fieldInfo)
Build a ChannelInfo array form a format string.

LizardTech