ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
E57SimpleReader.h
Go to the documentation of this file.
1 /*
2  * E57Simple - public header of E57 Simple API for reading/writing .e57 files.
3  *
4  * Copyright (c) 2010 Stan Coleby (scoleby@intelisum.com)
5  * Copyright (c) 2020 PTC Inc.
6  *
7  * Permission is hereby granted, free of charge, to any person or organization
8  * obtaining a copy of the software and accompanying documentation covered by
9  * this license (the "Software") to use, reproduce, display, distribute,
10  * execute, and transmit the Software, and to prepare derivative works of the
11  * Software, and to permit third-parties to whom the Software is furnished to
12  * do so, all subject to the following:
13  *
14  * The copyright notices in the Software and this entire statement, including
15  * the above license grant, this restriction and the following disclaimer,
16  * must be included in all copies of the Software, in whole or in part, and
17  * all derivative works of the Software, unless such copies or derivative
18  * works are solely in the form of machine-executable object code generated by
19  * a source language processor.
20  *
21  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23  * FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
24  * SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
25  * FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
26  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27  * DEALINGS IN THE SOFTWARE.
28  */
29 
30 #pragma once
31 
33 
34 #include "E57SimpleData.h"
35 
36 namespace e57
37 {
38 
40  class E57_DLL Reader
41  {
42  public:
45  Reader( const ustring &filePath );
47  bool IsOpen() const;
48 
50  bool Close();
51 
54 
58  bool GetE57Root( E57Root &fileHeader ) const;
59 
61 
64 
67  int64_t GetImage2DCount() const;
68 
73  bool ReadImage2D( int64_t imageIndex, Image2D &image2DHeader ) const;
74 
85  bool GetImage2DSizes( int64_t imageIndex, Image2DProjection &imageProjection, Image2DType &imageType,
86  int64_t &imageWidth, int64_t &imageHeight, int64_t &imageSize, Image2DType &imageMaskType,
87  Image2DType &imageVisualType ) const;
88 
97  int64_t ReadImage2DData( int64_t imageIndex, Image2DProjection imageProjection, Image2DType imageType,
98  void *buffer, int64_t start, int64_t count ) const;
99 
101 
104 
107  int64_t GetData3DCount() const;
108 
113  bool ReadData3D( int64_t dataIndex, Data3D &data3DHeader ) const;
114 
124  bool GetData3DSizes( int64_t dataIndex, int64_t &rowMax, int64_t &columnMax, int64_t &pointsSize,
125  int64_t &groupsSize, int64_t &countSize, bool &columnIndex ) const;
126 
135  bool ReadData3DGroupsData( int64_t dataIndex, int64_t groupCount, int64_t *idElementValue,
136  int64_t *startPointIndex, int64_t *pointCount ) const;
137 
145  CompressedVectorReader SetUpData3DPointsData( int64_t dataIndex, size_t pointCount,
146  const Data3DPointsData &buffers ) const;
147 
155  CompressedVectorReader SetUpData3DPointsData( int64_t dataIndex, size_t pointCount,
156  const Data3DPointsData_d &buffers ) const;
157 
159 
162 
164  StructureNode GetRawE57Root() const;
165 
167  VectorNode GetRawData3D() const;
168 
170  VectorNode GetRawImages2D() const;
171 
173  ImageFile GetRawIMF() const;
174 
176 
179  protected:
180  friend class ReaderImpl;
181 
182  E57_OBJECT_IMPLEMENTATION( Reader ) // Internal implementation details, not part of API, must be last in object
184  }; // end Reader class
185 
186 } // end namespace e57
Data structures for E57 Simple API.
int count
most of the functions follows Reader
Definition: ReaderImpl.h:37
Used for reading of the E57 file with E57 Simple API.
Image2DProjection
Identifies the representation for the image data.
Image2DType
Identifies the format representation for the image data.
std::string ustring
UTF-8 encodeded Unicode string.
Definition: E57Format.h:54
static int columnIndex(Table *pTab, const char *zCol)
Definition: sqlite3.c:129243
Stores pointers to user-provided buffers.
Stores the top-level information for a single lidar scan.
Stores the top-level information for the XML section of the file.
Stores an image from a camera.