|
30 | 30 |
|
31 | 31 | #pragma once
|
32 | 32 |
|
33 |
| -//! @file |
34 |
| -//! @brief E57 Simple API for reading E57. |
35 |
| -//! @details This includes support for the [E57_EXT_surface_normals](http://www.libe57.org/E57_EXT_surface_normals.txt) |
36 |
| -//! extension. |
| 33 | +/// @file |
| 34 | +/// @brief E57 Simple API for reading E57. |
| 35 | +/// @details This includes support for the |
| 36 | +/// [E57_EXT_surface_normals](http://www.libe57.org/E57_EXT_surface_normals.txt) extension. |
37 | 37 |
|
38 | 38 | #include "E57SimpleData.h"
|
39 | 39 |
|
40 | 40 | namespace e57
|
41 | 41 | {
|
42 |
| - //! Options to the Reader constructor |
| 42 | + /// Options to the Reader constructor |
43 | 43 | struct E57_DLL ReaderOptions
|
44 | 44 | {
|
45 |
| - //! Set how frequently to verify the checksums (see ReadChecksumPolicy). |
| 45 | + /// Set how frequently to verify the checksums (see ReadChecksumPolicy). |
46 | 46 | ReadChecksumPolicy checksumPolicy = ChecksumAll;
|
47 | 47 | };
|
48 | 48 |
|
49 |
| - //! @brief Used for reading an E57 file using E57 Simple API. |
50 |
| - //! |
51 |
| - //! The Reader includes support for the [E57_EXT_surface_normals](http://www.libe57.org/E57_EXT_surface_normals.txt) |
52 |
| - //! extension. |
| 49 | + /// @brief Used for reading an E57 file using E57 Simple API. |
| 50 | + /// |
| 51 | + /// The Reader includes support for the |
| 52 | + /// [E57_EXT_surface_normals](http://www.libe57.org/E57_EXT_surface_normals.txt) extension. |
53 | 53 | class E57_DLL Reader
|
54 | 54 | {
|
55 | 55 | public:
|
56 |
| - //! @brief Reader constructor |
57 |
| - //! @param [in] filePath Path to E57 file |
58 |
| - //! @param [in] options Options to be used for the file |
| 56 | + /// @brief Reader constructor |
| 57 | + /// @param [in] filePath Path to E57 file |
| 58 | + /// @param [in] options Options to be used for the file |
59 | 59 | Reader( const ustring &filePath, const ReaderOptions &options );
|
60 | 60 |
|
61 |
| - //! @brief Reader constructor (deprecated) |
62 |
| - //! @param [in] filePath Path to E57 file |
63 |
| - //! @deprecated Will be removed in 4.0. Use Reader( const ustring &, const ReaderOptions & ) instead. |
64 |
| - [[deprecated( |
65 |
| - "Will be removed in 4.0. Use Reader( const ustring, const ReaderOptions & )." )]] // TODO Remove in 4.0 |
| 61 | + /// @brief Reader constructor (deprecated) |
| 62 | + /// @param [in] filePath Path to E57 file |
| 63 | + /// @deprecated Will be removed in 4.0. Use Reader( const ustring &, const ReaderOptions & ) |
| 64 | + /// instead. |
| 65 | + [[deprecated( "Will be removed in 4.0. Use Reader( const ustring, const ReaderOptions & " |
| 66 | + ")." )]] // TODO Remove in 4.0 |
66 | 67 | explicit Reader( const ustring &filePath );
|
67 | 68 |
|
68 |
| - //! @brief Returns true if the file is open |
| 69 | + /// @brief Returns true if the file is open |
69 | 70 | bool IsOpen() const;
|
70 | 71 |
|
71 |
| - //! @brief Closes the file |
| 72 | + /// @brief Closes the file |
72 | 73 | bool Close();
|
73 | 74 |
|
74 |
| - //! @name File information |
75 |
| - //!@{ |
| 75 | + /// @name File information |
| 76 | + ///@{ |
76 | 77 |
|
77 |
| - //! @brief Returns the file header information |
78 |
| - //! @param [out] fileHeader is the main header information |
79 |
| - //! @return Returns true if successful |
| 78 | + /// @brief Returns the file header information |
| 79 | + /// @param [out] fileHeader is the main header information |
| 80 | + /// @return Returns true if successful |
80 | 81 | bool GetE57Root( E57Root &fileHeader ) const;
|
81 | 82 |
|
82 |
| - //!@} |
| 83 | + ///@} |
83 | 84 |
|
84 |
| - //! @name Image2D |
85 |
| - //!@{ |
| 85 | + /// @name Image2D |
| 86 | + ///@{ |
86 | 87 |
|
87 |
| - //! @brief Returns the total number of Picture Blocks |
88 |
| - //! @return Returns the number of Image2D blocks |
| 88 | + /// @brief Returns the total number of Picture Blocks |
| 89 | + /// @return Returns the number of Image2D blocks |
89 | 90 | int64_t GetImage2DCount() const;
|
90 | 91 |
|
91 |
| - //! @brief Returns the image2D header and positions the cursor |
92 |
| - //! @param [in] imageIndex This in the index into the image2D vector |
93 |
| - //! @param [out] image2DHeader pointer to the Image2D structure to receive the picture information |
94 |
| - //! @return Returns true if successful |
| 92 | + /// @brief Returns the image2D header and positions the cursor |
| 93 | + /// @param [in] imageIndex This in the index into the image2D vector |
| 94 | + /// @param [out] image2DHeader pointer to the Image2D structure to receive the picture |
| 95 | + /// information |
| 96 | + /// @return Returns true if successful |
95 | 97 | bool ReadImage2D( int64_t imageIndex, Image2D &image2DHeader ) const;
|
96 | 98 |
|
97 |
| - //! @brief Returns the size of the image data |
98 |
| - //! @param [in] imageIndex This in the index into the image2D vector |
99 |
| - //! @param [out] imageProjection identifies the projection in the image2D. |
100 |
| - //! @param [out] imageType identifies the image format of the projection. |
101 |
| - //! @param [out] imageWidth The image width (in pixels). |
102 |
| - //! @param [out] imageHeight The image height (in pixels). |
103 |
| - //! @param [out] imageSize This is the total number of bytes for the image blob. |
104 |
| - //! @param [out] imageMaskType This is E57_PNG_IMAGE_MASK if "imageMask" is defined in the projection |
105 |
| - //! @param [out] imageVisualType This is image type of the VisualReferenceRepresentation if given. |
106 |
| - //! @return Returns true if successful |
107 |
| - bool GetImage2DSizes( int64_t imageIndex, Image2DProjection &imageProjection, Image2DType &imageType, |
108 |
| - int64_t &imageWidth, int64_t &imageHeight, int64_t &imageSize, Image2DType &imageMaskType, |
| 99 | + /// @brief Returns the size of the image data |
| 100 | + /// @param [in] imageIndex This in the index into the image2D vector |
| 101 | + /// @param [out] imageProjection identifies the projection in the image2D. |
| 102 | + /// @param [out] imageType identifies the image format of the projection. |
| 103 | + /// @param [out] imageWidth The image width (in pixels). |
| 104 | + /// @param [out] imageHeight The image height (in pixels). |
| 105 | + /// @param [out] imageSize This is the total number of bytes for the image blob. |
| 106 | + /// @param [out] imageMaskType This is E57_PNG_IMAGE_MASK if "imageMask" is defined in the |
| 107 | + /// projection |
| 108 | + /// @param [out] imageVisualType This is image type of the VisualReferenceRepresentation if |
| 109 | + /// given. |
| 110 | + /// @return Returns true if successful |
| 111 | + bool GetImage2DSizes( int64_t imageIndex, Image2DProjection &imageProjection, |
| 112 | + Image2DType &imageType, int64_t &imageWidth, int64_t &imageHeight, |
| 113 | + int64_t &imageSize, Image2DType &imageMaskType, |
109 | 114 | Image2DType &imageVisualType ) const;
|
110 | 115 |
|
111 |
| - //! @brief Reads an image |
112 |
| - //! @param [in] imageIndex index of the image. Must be less than GetImage2DCount() |
113 |
| - //! @param [in] imageProjection identifies the projection desired. |
114 |
| - //! @param [in] imageType identifies the image format desired. |
115 |
| - //! @param [out] buffer pointer the raw image buffer |
116 |
| - //! @param [in] start position in the block to start reading |
117 |
| - //! @param [in] count size of desired chuck or buffer size |
118 |
| - //! @return Returns the number of bytes transferred. |
119 |
| - int64_t ReadImage2DData( int64_t imageIndex, Image2DProjection imageProjection, Image2DType imageType, |
120 |
| - void *buffer, int64_t start, int64_t count ) const; |
121 |
| - |
122 |
| - //!@} |
123 |
| - |
124 |
| - //! @name Data3D |
125 |
| - //!@{ |
126 |
| - |
127 |
| - //! @brief Returns the total number of Data3D Blocks |
128 |
| - //! @return Returns number of Data3D blocks. |
| 116 | + /// @brief Reads an image |
| 117 | + /// @param [in] imageIndex index of the image. Must be less than GetImage2DCount() |
| 118 | + /// @param [in] imageProjection identifies the projection desired. |
| 119 | + /// @param [in] imageType identifies the image format desired. |
| 120 | + /// @param [out] buffer pointer the raw image buffer |
| 121 | + /// @param [in] start position in the block to start reading |
| 122 | + /// @param [in] count size of desired chuck or buffer size |
| 123 | + /// @return Returns the number of bytes transferred. |
| 124 | + int64_t ReadImage2DData( int64_t imageIndex, Image2DProjection imageProjection, |
| 125 | + Image2DType imageType, void *buffer, int64_t start, |
| 126 | + int64_t count ) const; |
| 127 | + |
| 128 | + ///@} |
| 129 | + |
| 130 | + /// @name Data3D |
| 131 | + ///@{ |
| 132 | + |
| 133 | + /// @brief Returns the total number of Data3D Blocks |
| 134 | + /// @return Returns number of Data3D blocks. |
129 | 135 | int64_t GetData3DCount() const;
|
130 | 136 |
|
131 |
| - //! @brief Returns the Data3D header |
132 |
| - //! @param [in] dataIndex This in the index into the images3D vector. Must be less than GetData3DCount(). |
133 |
| - //! @param [out] data3DHeader Data3D header |
134 |
| - //! @return Returns true if successful |
| 137 | + /// @brief Returns the Data3D header |
| 138 | + /// @param [in] dataIndex This in the index into the images3D vector. Must be less than |
| 139 | + /// GetData3DCount(). |
| 140 | + /// @param [out] data3DHeader Data3D header |
| 141 | + /// @return Returns true if successful |
135 | 142 | bool ReadData3D( int64_t dataIndex, Data3D &data3DHeader ) const;
|
136 | 143 |
|
137 |
| - //! @brief Returns the size of the point data |
138 |
| - //! @param [in] dataIndex This in the index into the images3D vector. Must be less than GetData3DCount(). |
139 |
| - //! @param [out] rowMax This is the maximum row size |
140 |
| - //! @param [out] columnMax This is the maximum column size |
141 |
| - //! @param [out] pointsSize This is the total number of point records |
142 |
| - //! @param [out] groupsSize This is the total number of group records |
143 |
| - //! @param [out] countSize This is the maximum point count per group |
144 |
| - //! @param [out] columnIndex This indicates that the idElementName is "columnIndex" |
145 |
| - //! @return Return true if successful, false otherwise |
146 |
| - bool GetData3DSizes( int64_t dataIndex, int64_t &rowMax, int64_t &columnMax, int64_t &pointsSize, |
147 |
| - int64_t &groupsSize, int64_t &countSize, bool &columnIndex ) const; |
148 |
| - |
149 |
| - //! @brief Reads the group data into the provided buffers. |
150 |
| - //! @param [in] dataIndex This in the index into the images3D vector. Must be less than GetData3DCount(). |
151 |
| - //! @param [in] groupCount size of each of the buffers given |
152 |
| - //! @param [out] idElementValue pointer to the buffer holding indices index for this group |
153 |
| - //! @param [out] startPointIndex pointer to the buffer holding Starting index in to the "points" data vector for |
154 |
| - //! the groups |
155 |
| - //! @param [out] pointCount pointer to the buffer holding size of the groups given |
156 |
| - //! @return Return true if successful, false otherwise |
| 144 | + /// @brief Returns the size of the point data |
| 145 | + /// @param [in] dataIndex This in the index into the images3D vector. Must be less than |
| 146 | + /// GetData3DCount(). |
| 147 | + /// @param [out] rowMax This is the maximum row size |
| 148 | + /// @param [out] columnMax This is the maximum column size |
| 149 | + /// @param [out] pointsSize This is the total number of point records |
| 150 | + /// @param [out] groupsSize This is the total number of group records |
| 151 | + /// @param [out] countSize This is the maximum point count per group |
| 152 | + /// @param [out] columnIndex This indicates that the idElementName is "columnIndex" |
| 153 | + /// @return Return true if successful, false otherwise |
| 154 | + bool GetData3DSizes( int64_t dataIndex, int64_t &rowMax, int64_t &columnMax, |
| 155 | + int64_t &pointsSize, int64_t &groupsSize, int64_t &countSize, |
| 156 | + bool &columnIndex ) const; |
| 157 | + |
| 158 | + /// @brief Reads the group data into the provided buffers. |
| 159 | + /// @param [in] dataIndex This in the index into the images3D vector. Must be less than |
| 160 | + /// GetData3DCount(). |
| 161 | + /// @param [in] groupCount size of each of the buffers given |
| 162 | + /// @param [out] idElementValue pointer to the buffer holding indices index for this group |
| 163 | + /// @param [out] startPointIndex pointer to the buffer holding Starting index in to the |
| 164 | + /// "points" data vector for the groups |
| 165 | + /// @param [out] pointCount pointer to the buffer holding size of the groups given |
| 166 | + /// @return Return true if successful, false otherwise |
157 | 167 | bool ReadData3DGroupsData( int64_t dataIndex, int64_t groupCount, int64_t *idElementValue,
|
158 | 168 | int64_t *startPointIndex, int64_t *pointCount ) const;
|
159 | 169 |
|
160 |
| - //! @brief Use this to read the actual 3D data |
161 |
| - //! @details All the non-NULL buffers in buffers have number of elements = pointCount. |
162 |
| - //! Call the CompressedVectorReader::read() until all data is read. |
163 |
| - //! @param [in] dataIndex data block index |
164 |
| - //! @param [in] pointCount size of each element buffer. |
165 |
| - //! @param [in] buffers pointers to user-provided buffers |
166 |
| - //! @return vector reader setup to read the selected data into the provided buffers |
| 170 | + /// @brief Use this to read the actual 3D data |
| 171 | + /// @details All the non-NULL buffers in buffers have number of elements = pointCount. |
| 172 | + /// Call the CompressedVectorReader::read() until all data is read. |
| 173 | + /// @param [in] dataIndex data block index |
| 174 | + /// @param [in] pointCount size of each element buffer. |
| 175 | + /// @param [in] buffers pointers to user-provided buffers |
| 176 | + /// @return vector reader setup to read the selected data into the provided buffers |
167 | 177 | CompressedVectorReader SetUpData3DPointsData( int64_t dataIndex, size_t pointCount,
|
168 | 178 | const Data3DPointsData &buffers ) const;
|
169 | 179 |
|
170 |
| - //! @overload |
| 180 | + /// @overload |
171 | 181 | CompressedVectorReader SetUpData3DPointsData( int64_t dataIndex, size_t pointCount,
|
172 | 182 | const Data3DPointsData_d &buffers ) const;
|
173 | 183 |
|
174 |
| - //!@} |
| 184 | + ///@} |
175 | 185 |
|
176 |
| - //! @name Foundation API file information |
177 |
| - //!@{ |
| 186 | + /// @name File information |
| 187 | + ///@{ |
178 | 188 |
|
179 |
| - //! @brief Returns the file raw E57Root Structure Node |
| 189 | + /// @brief Returns the file raw E57Root Structure Node |
180 | 190 | StructureNode GetRawE57Root() const;
|
181 | 191 |
|
182 |
| - //! @brief Returns the raw Data3D Vector Node |
| 192 | + /// @brief Returns the raw Data3D Vector Node |
183 | 193 | VectorNode GetRawData3D() const;
|
184 | 194 |
|
185 |
| - //! @brief Returns the raw Image2D Vector Node |
| 195 | + /// @brief Returns the raw Image2D Vector Node |
186 | 196 | VectorNode GetRawImages2D() const;
|
187 | 197 |
|
188 |
| - //! @brief Returns the ram ImageFile Node which is need to add enhancements |
| 198 | + /// @brief Returns the ram ImageFile Node which is need to add enhancements |
189 | 199 | ImageFile GetRawIMF() const;
|
190 | 200 |
|
191 |
| - //!@} |
| 201 | + ///@} |
192 | 202 |
|
193 |
| - //! @cond documentNonPublic The following isn't part of the API, and isn't documented. |
194 | 203 | protected:
|
| 204 | + /// @cond documentNonPublic The following isn't part of the API, and isn't documented. |
195 | 205 | friend class ReaderImpl;
|
196 | 206 |
|
197 |
| - E57_OBJECT_IMPLEMENTATION( Reader ) // Internal implementation details, not part of API, must be last in object |
198 |
| - //! @endcond |
| 207 | + E57_OBJECT_IMPLEMENTATION( Reader ) // must be last in object |
| 208 | + /// @endcond |
199 | 209 | }; // end Reader class
|
200 | 210 |
|
201 | 211 | } // end namespace e57
|
0 commit comments