ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
E57SimpleWriter.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 Writer
41  {
42  public:
46  Writer( const ustring &filePath, const ustring &coordinateMetaData = {} );
47 
49  bool IsOpen() const;
50 
52  bool Close();
53 
56 
61  int64_t NewImage2D( Image2D &image2DHeader );
62 
71  int64_t WriteImage2DData( int64_t imageIndex, Image2DType imageType, Image2DProjection imageProjection,
72  void *buffer, int64_t start, int64_t count );
73 
75 
78 
84  int64_t NewData3D( Data3D &data3DHeader );
85 
91  CompressedVectorWriter SetUpData3DPointsData( int64_t dataIndex, size_t pointCount,
92  const Data3DPointsData &buffers );
93 
99  CompressedVectorWriter SetUpData3DPointsData( int64_t dataIndex, size_t pointCount,
100  const Data3DPointsData_d &buffers );
101 
109  bool WriteData3DGroupsData( int64_t dataIndex, int64_t groupCount, int64_t *idElementValue,
110  int64_t *startPointIndex, int64_t *pointCount );
111 
113 
116 
118  StructureNode GetRawE57Root();
120  VectorNode GetRawData3D();
122  VectorNode GetRawImages2D();
124  ImageFile GetRawIMF();
125 
127 
130  protected:
131  friend class WriterImpl;
132 
133  E57_OBJECT_IMPLEMENTATION( Writer ) // Internal implementation details, not part of API, must be last in object
135  }; // end Writer class
136 
137 } // end namespace e57
Data structures for E57 Simple API.
int count
most of the functions follows Writer
Definition: WriterImpl.h:37
Used for writing 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
Stores pointers to user-provided buffers.
Stores the top-level information for a single lidar scan.
Stores an image from a camera.