e57::Reader Class Reference

Used for reading of the E57 file with E57 Simple API. More...

#include <E57SimpleReader.h>

Public Member Functions

bool Close ()
 This function closes the file. More...
 
bool IsOpen () const
 This function returns true if the file is open. More...
 
 Reader (const ustring &filePath)
 This function is the constructor for the reader class. More...
 
File information
bool GetE57Root (E57Root &fileHeader) const
 This function returns the file header information. More...
 
Image2D
int64_t GetImage2DCount () const
 This function returns the total number of Picture Blocks. More...
 
bool ReadImage2D (int64_t imageIndex, Image2D &image2DHeader) const
 This function returns the image2D header and positions the cursor. More...
 
bool GetImage2DSizes (int64_t imageIndex, Image2DProjection &imageProjection, Image2DType &imageType, int64_t &imageWidth, int64_t &imageHeight, int64_t &imageSize, Image2DType &imageMaskType, Image2DType &imageVisualType) const
 This function returns the size of the image data. More...
 
int64_t ReadImage2DData (int64_t imageIndex, Image2DProjection imageProjection, Image2DType imageType, void *buffer, int64_t start, int64_t count) const
 This function reads an image. More...
 
Data3D
int64_t GetData3DCount () const
 This function returns the total number of Data3D Blocks. More...
 
bool ReadData3D (int64_t dataIndex, Data3D &data3DHeader) const
 This function returns the Data3D header. More...
 
bool GetData3DSizes (int64_t dataIndex, int64_t &rowMax, int64_t &columnMax, int64_t &pointsSize, int64_t &groupsSize, int64_t &countSize, bool &columnIndex) const
 This function returns the size of the point data. More...
 
bool ReadData3DGroupsData (int64_t dataIndex, int64_t groupCount, int64_t *idElementValue, int64_t *startPointIndex, int64_t *pointCount) const
 This function reads the group data into the provided buffers. More...
 
CompressedVectorReader SetUpData3DPointsData (int64_t dataIndex, size_t pointCount, const Data3DPointsData &buffers) const
 Use this function to read the actual 3D data. More...
 
CompressedVectorReader SetUpData3DPointsData (int64_t dataIndex, size_t pointCount, const Data3DPointsData_d &buffers) const
 Use this function to read the actual 3D data. More...
 
Foundation API file information
StructureNode GetRawE57Root () const
 Returns the file raw E57Root Structure Node. More...
 
VectorNode GetRawData3D () const
 Returns the raw Data3D Vector Node. More...
 
VectorNode GetRawImages2D () const
 Returns the raw Image2D Vector Node. More...
 
ImageFile GetRawIMF () const
 Returns the ram ImageFile Node which is need to add enhancements. More...
 

Detailed Description

Used for reading of the E57 file with E57 Simple API.

Constructor & Destructor Documentation

◆ Reader()

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

This function is the constructor for the reader class.

Parameters
[in]filePathfile path to E57 file

Member Function Documentation

◆ Close()

bool e57::Reader::Close ( )

This function closes the file.

◆ GetData3DCount()

int64_t e57::Reader::GetData3DCount ( ) const

This function 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

This function 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 reocrds
[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

This function returns the file header information.

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

◆ GetImage2DCount()

int64_t e57::Reader::GetImage2DCount ( ) const

This function 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

This function 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

This function returns true if the file is open.

◆ ReadData3D()

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

This function 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,
int64_t  groupCount,
int64_t *  idElementValue,
int64_t *  startPointIndex,
int64_t *  pointCount 
) const

This function 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

This function 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

This function 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 Data3DPointsData buffers 
) const

Use this function 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 given by the NewData3D
[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

◆ SetUpData3DPointsData() [2/2]

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

Use this function 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 given by the NewData3D
[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: