MrSID Decode SDK for LiDAR Reference Manual  1.1.3.4427
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__

LizardTech