ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
e57::Reader Class Reference

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

#include <E57SimpleReader.h>

Public Member Functions

 Reader (const ustring &filePath)
 This function is the constructor for the reader class. More...
 
bool IsOpen () const
 This function returns true if the file is open. More...
 
bool Close ()
 This function closes the file. 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 funtion 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.

Definition at line 40 of file E57SimpleReader.h.

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

Definition at line 34 of file E57SimpleReader.cpp.

Member Function Documentation

◆ Close()

bool e57::Reader::Close ( )

This function closes the file.

Definition at line 43 of file E57SimpleReader.cpp.

◆ GetData3DCount()

int64_t e57::Reader::GetData3DCount ( ) const

This function returns the total number of Data3D Blocks.

Returns
Returns number of Data3D blocks.

Definition at line 77 of file E57SimpleReader.cpp.

◆ 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 sucessful, false otherwise

Definition at line 107 of file E57SimpleReader.cpp.

◆ 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 sucessful

Definition at line 48 of file E57SimpleReader.cpp.

◆ GetImage2DCount()

int64_t e57::Reader::GetImage2DCount ( ) const

This function returns the total number of Picture Blocks.

Returns
Returns the number of Image2D blocks

Definition at line 53 of file E57SimpleReader.cpp.

◆ 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 sucessful

Definition at line 63 of file E57SimpleReader.cpp.

◆ GetRawData3D()

VectorNode e57::Reader::GetRawData3D ( ) const

Returns the raw Data3D Vector Node.

Definition at line 92 of file E57SimpleReader.cpp.

◆ GetRawE57Root()

StructureNode e57::Reader::GetRawE57Root ( ) const

Returns the file raw E57Root Structure Node.

Definition at line 87 of file E57SimpleReader.cpp.

◆ GetRawImages2D()

VectorNode e57::Reader::GetRawImages2D ( ) const

Returns the raw Image2D Vector Node.

Definition at line 97 of file E57SimpleReader.cpp.

◆ GetRawIMF()

ImageFile e57::Reader::GetRawIMF ( ) const

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

Definition at line 82 of file E57SimpleReader.cpp.

◆ IsOpen()

bool e57::Reader::IsOpen ( ) const

This function returns true if the file is open.

Definition at line 38 of file E57SimpleReader.cpp.

◆ 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 sucessful

Definition at line 102 of file E57SimpleReader.cpp.

◆ ReadData3DGroupsData()

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

This funtion 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 sucessful, false otherwise

Definition at line 113 of file E57SimpleReader.cpp.

◆ 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 sucessful

Definition at line 58 of file E57SimpleReader.cpp.

◆ 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.

Definition at line 71 of file E57SimpleReader.cpp.

References count.

◆ 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

Definition at line 119 of file E57SimpleReader.cpp.

◆ 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

Definition at line 125 of file E57SimpleReader.cpp.


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