libE57Format 3.1.1
C++ library to read & write the E57 file format for point cloud data
Loading...
Searching...
No Matches
e57::Reader Class Reference

Used for reading an E57 file using E57 Simple API. More...

#include <E57SimpleReader.h>

Public Member Functions

 Reader (const ustring &filePath)
 Reader constructor (deprecated)
 
 Reader (const ustring &filePath, const ReaderOptions &options)
 Reader constructor.
 
bool Close ()
 Closes the file.
 
bool IsOpen () const
 Returns true if the file is open.
 
File information
bool GetE57Root (E57Root &fileHeader) const
 Returns the file header information.
 
StructureNode GetRawE57Root () const
 Returns the file raw E57Root Structure Node.
 
VectorNode GetRawData3D () const
 Returns the raw Data3D Vector Node.
 
VectorNode GetRawImages2D () const
 Returns the raw Image2D Vector Node.
 
ImageFile GetRawIMF () const
 Returns the ram ImageFile Node which is need to add enhancements.
 
Image2D
int64_t GetImage2DCount () const
 Returns the total number of Picture Blocks.
 
bool ReadImage2D (int64_t imageIndex, Image2D &image2DHeader) const
 Returns the image2D header and positions the cursor.
 
bool GetImage2DSizes (int64_t imageIndex, Image2DProjection &imageProjection, Image2DType &imageType, int64_t &imageWidth, int64_t &imageHeight, int64_t &imageSize, Image2DType &imageMaskType, Image2DType &imageVisualType) const
 Returns the size of the image data.
 
int64_t ReadImage2DData (int64_t imageIndex, Image2DProjection imageProjection, Image2DType imageType, void *buffer, int64_t start, int64_t count) const
 Reads an image.
 
Data3D
int64_t GetData3DCount () const
 Returns the total number of Data3D Blocks.
 
bool ReadData3D (int64_t dataIndex, Data3D &data3DHeader) const
 Returns the Data3D header.
 
bool GetData3DSizes (int64_t dataIndex, int64_t &rowMax, int64_t &columnMax, int64_t &pointsSize, int64_t &groupsSize, int64_t &countSize, bool &columnIndex) const
 Returns the size of the point data.
 
bool ReadData3DGroupsData (int64_t dataIndex, size_t groupCount, int64_t *idElementValue, int64_t *startPointIndex, int64_t *pointCount) const
 Reads the group data into the provided buffers.
 
CompressedVectorReader SetUpData3DPointsData (int64_t dataIndex, size_t pointCount, const Data3DPointsFloat &buffers) const
 Use this to read the actual 3D data.
 
CompressedVectorReader SetUpData3DPointsData (int64_t dataIndex, size_t pointCount, const Data3DPointsDouble &buffers) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 

Detailed Description

Used for reading an E57 file using E57 Simple API.

The Reader includes support for the E57_EXT_surface_normals extension.

Constructor & Destructor Documentation

◆ Reader() [1/2]

e57::Reader::Reader ( const ustring filePath,
const ReaderOptions options 
)

Reader constructor.

Parameters
[in]filePathPath to E57 file
[in]optionsOptions to be used for the file

◆ Reader() [2/2]

e57::Reader::Reader ( const ustring filePath)
explicit

Reader constructor (deprecated)

Parameters
[in]filePathPath to E57 file
Deprecated:
Will be removed in 4.0. Use Reader( const ustring &, const ReaderOptions & ) instead.

Member Function Documentation

◆ Close()

bool e57::Reader::Close ( )

Closes the file.

◆ GetData3DCount()

int64_t e57::Reader::GetData3DCount ( ) const

Returns the total number of Data3D Blocks.

Returns
Returns number of Data3D blocks.

◆ GetData3DSizes()

bool e57::Reader::GetData3DSizes ( int64_t  dataIndex,
int64_t &  rowMax,
int64_t &  columnMax,
int64_t &  pointsSize,
int64_t &  groupsSize,
int64_t &  countSize,
bool &  columnIndex 
) const

Returns the size of the point data.

Parameters
[in]dataIndexThis in the index into the images3D vector. Must be less than GetData3DCount().
[out]rowMaxThis is the maximum row size
[out]columnMaxThis is the maximum column size
[out]pointsSizeThis is the total number of point records
[out]groupsSizeThis is the total number of group records
[out]countSizeThis is the maximum point count per group
[out]columnIndexThis indicates that the idElementName is "columnIndex"
Returns
Return true if successful, false otherwise

◆ GetE57Root()

bool e57::Reader::GetE57Root ( E57Root fileHeader) const

Returns the file header information.

Parameters
[out]fileHeaderis the main header information
Returns
Returns true if successful

◆ GetImage2DCount()

int64_t e57::Reader::GetImage2DCount ( ) const

Returns the total number of Picture Blocks.

Returns
Returns the number of Image2D blocks

◆ GetImage2DSizes()

bool e57::Reader::GetImage2DSizes ( int64_t  imageIndex,
Image2DProjection imageProjection,
Image2DType imageType,
int64_t &  imageWidth,
int64_t &  imageHeight,
int64_t &  imageSize,
Image2DType imageMaskType,
Image2DType imageVisualType 
) const

Returns the size of the image data.

Parameters
[in]imageIndexThis in the index into the image2D vector
[out]imageProjectionidentifies the projection in the image2D.
[out]imageTypeidentifies the image format of the projection.
[out]imageWidthThe image width (in pixels).
[out]imageHeightThe image height (in pixels).
[out]imageSizeThis is the total number of bytes for the image blob.
[out]imageMaskTypeThis is E57_PNG_IMAGE_MASK if "imageMask" is defined in the projection
[out]imageVisualTypeThis is image type of the VisualReferenceRepresentation if given.
Returns
Returns true if successful

◆ GetRawData3D()

VectorNode e57::Reader::GetRawData3D ( ) const

Returns the raw Data3D Vector Node.

◆ GetRawE57Root()

StructureNode e57::Reader::GetRawE57Root ( ) const

Returns the file raw E57Root Structure Node.

◆ GetRawImages2D()

VectorNode e57::Reader::GetRawImages2D ( ) const

Returns the raw Image2D Vector Node.

◆ GetRawIMF()

ImageFile e57::Reader::GetRawIMF ( ) const

Returns the ram ImageFile Node which is need to add enhancements.

◆ IsOpen()

bool e57::Reader::IsOpen ( ) const

Returns true if the file is open.

◆ ReadData3D()

bool e57::Reader::ReadData3D ( int64_t  dataIndex,
Data3D data3DHeader 
) const

Returns the Data3D header.

Parameters
[in]dataIndexThis in the index into the images3D vector. Must be less than GetData3DCount().
[out]data3DHeaderData3D header
Returns
Returns true if successful

◆ ReadData3DGroupsData()

bool e57::Reader::ReadData3DGroupsData ( int64_t  dataIndex,
size_t  groupCount,
int64_t *  idElementValue,
int64_t *  startPointIndex,
int64_t *  pointCount 
) const

Reads the group data into the provided buffers.

Parameters
[in]dataIndexThis in the index into the images3D vector. Must be less than GetData3DCount().
[in]groupCountsize of each of the buffers given
[out]idElementValuepointer to the buffer holding indices index for this group
[out]startPointIndexpointer to the buffer holding Starting index in to the "points" data vector for the groups
[out]pointCountpointer to the buffer holding size of the groups given
Returns
Return true if successful, false otherwise

◆ ReadImage2D()

bool e57::Reader::ReadImage2D ( int64_t  imageIndex,
Image2D image2DHeader 
) const

Returns the image2D header and positions the cursor.

Parameters
[in]imageIndexThis in the index into the image2D vector
[out]image2DHeaderpointer to the Image2D structure to receive the picture information
Returns
Returns true if successful

◆ ReadImage2DData()

int64_t e57::Reader::ReadImage2DData ( int64_t  imageIndex,
Image2DProjection  imageProjection,
Image2DType  imageType,
void *  buffer,
int64_t  start,
int64_t  count 
) const

Reads an image.

Parameters
[in]imageIndexindex of the image. Must be less than GetImage2DCount()
[in]imageProjectionidentifies the projection desired.
[in]imageTypeidentifies the image format desired.
[out]bufferpointer the raw image buffer
[in]startposition in the block to start reading
[in]countsize of desired chuck or buffer size
Returns
Returns the number of bytes transferred.

◆ SetUpData3DPointsData() [1/2]

CompressedVectorReader e57::Reader::SetUpData3DPointsData ( int64_t  dataIndex,
size_t  pointCount,
const Data3DPointsDouble buffers 
) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ SetUpData3DPointsData() [2/2]

CompressedVectorReader e57::Reader::SetUpData3DPointsData ( int64_t  dataIndex,
size_t  pointCount,
const Data3DPointsFloat buffers 
) const

Use this to read the actual 3D data.

All the non-NULL buffers in buffers have number of elements = pointCount. Call the CompressedVectorReader::read() until all data is read.

Parameters
[in]dataIndexdata block index
[in]pointCountsize of each element buffer.
[in]bufferspointers to user-provided buffers
Returns
vector reader setup to read the selected data into the provided buffers

The documentation for this class was generated from the following files: