MrSID Decode SDK for LiDAR Reference Manual  1.1.2.4045
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 
135  static void parseFormat(const char *format,
136  PointInfo &fieldInfo);
147  static void parseFormat(const char *format,
148  PointInfo &fieldInfo,
149  const PointInfo &pointInfo);
150 
151 protected:
152  void setBoundsAndNumPoints(bool doFullInit);
153 
155  size_t m_header;
157  double m_totalWork;
158 
159  class Iterator;
160 };
161 
162 LT_END_LIDAR_NAMESPACE
163 #endif // __LIDAR_TXT_POINT_READER_H__
Metadata is a container for storing metadata about the point cloud.
Definition: Metadata.h:64
TXTPointReader reads LiDAR-based Text files.
Bounds is a 3-dimensional bounding box.
Definition: Types.h:127
ProgressDelegate is the base class for progress and interrupt reporting.
const char * getFileFormatString(void) const
Get the file type and version.
PointInfo is a group of ChannelInfo objects.
Definition: PointData.h:171
PointInfo m_fieldInfo
void loadMetadata(Metadata &metadata, bool sanitize) const
Load the point clouds metadata.
double getTotalWork(const Bounds &bounds, double fraction) const
Get the amount of work needed to decode bounds.
PointIterator * createIterator(const Bounds &bounds, double fraction, const PointInfo &pointInfo, ProgressDelegate *delegate) const
Get a PointIterator for a given bounds.
PointReader is the base class for reading LiDAR file formats.
Definition: PointReader.h:27
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.
IO is the base class for binary input and output.
Definition: IO.h:30
void setBoundsAndNumPoints(bool doFullInit)
static void parseFormat(const char *format, PointInfo &fieldInfo)
Build a ChannelInfo array form a format string.
PointIterator is the base class for accessing the point cloud.
Definition: PointIterator.h:31

LizardTech