E57 Simple API V1.0.312
Aug. 10, 2012
|
This is the E57 Reader class. More...
#include <E57Simple.h>
Public Member Functions | |
Reader (const ustring &filePath) | |
This function is the constructor for the reader class. | |
bool | IsOpen (void) const |
This function returns true if the file is open. | |
bool | Close (void) const |
This function closes the file. | |
bool | GetE57Root (E57Root &fileHeader) const |
This function returns the file header information. | |
int32_t | GetImage2DCount (void) const |
This function returns the total number of Picture Blocks. | |
bool | ReadImage2D (int32_t imageIndex, Image2D &image2DHeader) const |
This function returns the image2D header and positions the cursor. | |
bool | GetImage2DSizes (int32_t imageIndex, e57::Image2DProjection &imageProjection, e57::Image2DType &imageType, int64_t &imageWidth, int64_t &imageHeight, int64_t &imageSize, e57::Image2DType &imageMaskType, e57::Image2DType &imageVisualType) const |
This function returns the size of the image data. | |
int64_t | ReadImage2DData (int32_t imageIndex, e57::Image2DProjection imageProjection, e57::Image2DType imageType, void *pBuffer, int64_t start, int64_t count) const |
This function reads the block. | |
int32_t | GetData3DCount (void) const |
This function returns the total number of Data3D Blocks. | |
bool | ReadData3D (int32_t dataIndex, Data3D &data3DHeader) const |
This function returns the Data3D header and positions the cursor. | |
bool | GetData3DSizes (int32_t dataIndex, int64_t &rowMax, int64_t &columnMax, int64_t &pointsSize, int64_t &groupsSize, int64_t &countSize, bool &bColumnIndex) const |
This function returns the size of the point data. | |
bool | ReadData3DGroupsData (int32_t dataIndex, int32_t groupCount, int64_t *idElementValue, int64_t *startPointIndex, int64_t *pointCount) const |
This funtion writes out the group data. | |
CompressedVectorReader | SetUpData3DPointsData (int32_t dataIndex, int64_t pointCount, double *cartesianX, double *cartesianY, double *cartesianZ, int8_t *cartesianInvalidState=NULL, double *intensity=NULL, int8_t *isIntensityInvalid=NULL, uint16_t *colorRed=NULL, uint16_t *colorGreen=NULL, uint16_t *colorBlue=NULL, int8_t *isColorInvalid=NULL, double *sphericalRange=NULL, double *sphericalAzimuth=NULL, double *sphericalElevation=NULL, int8_t *sphericalInvalidState=NULL, int32_t *rowIndex=NULL, int32_t *columnIndex=NULL, int8_t *returnIndex=NULL, int8_t *returnCount=NULL, double *timeStamp=NULL, int8_t *isTimeStampInvalid=NULL) const |
This function sets up the point data fields. | |
StructureNode | GetRawE57Root (void) |
This function returns the file raw E57Root Structure Node. | |
VectorNode | GetRawData3D (void) |
This function returns the raw Data3D Vector Node. | |
VectorNode | GetRawImages2D (void) |
This function returns the raw Image2D Vector Node. | |
This is the E57 Reader class.
Reader::Reader | ( | const ustring & | filePath | ) |
This function is the constructor for the reader class.
filePath | file path string |
int32_t Reader::GetData3DCount | ( | void | ) | const |
bool Reader::GetData3DSizes | ( | int32_t | dataIndex, |
int64_t & | rowMax, | ||
int64_t & | columnMax, | ||
int64_t & | pointsSize, | ||
int64_t & | groupsSize, | ||
int64_t & | countSize, | ||
bool & | bColumnIndex | ||
) | const |
This function returns the size of the point data.
dataIndex | This in the index into the images3D vector |
rowMax | This is the maximum row size |
columnMax | This is the maximum column size |
pointsSize | This is the total number of point records |
groupsSize | This is the total number of group reocrds |
countSize | This is the maximum point count per group |
bColumnIndex | This indicates that the idElementName is "columnIndex" |
bool Reader::GetE57Root | ( | E57Root & | fileHeader | ) | const |
This function returns the file header information.
fileHeader | This is the main header information |
int32_t Reader::GetImage2DCount | ( | void | ) | const |
This function returns the total number of Picture Blocks.
bool Reader::GetImage2DSizes | ( | int32_t | imageIndex, |
e57::Image2DProjection & | imageProjection, | ||
e57::Image2DType & | imageType, | ||
int64_t & | imageWidth, | ||
int64_t & | imageHeight, | ||
int64_t & | imageSize, | ||
e57::Image2DType & | imageMaskType, | ||
e57::Image2DType & | imageVisualType | ||
) | const |
This function returns the size of the image data.
The e57::Image2DType identifies the format representation for the image data
enum Image2DType { E57_NO_IMAGE = 0, //!< No image data E57_JPEG_IMAGE = 1, //!< JPEG format image data. E57_PNG_IMAGE = 2, //!< PNG format image data. E57_PNG_IMAGE_MASK = 3 //!< PNG format image mask. };
The e57::Image2DProjection identifies the representation for the image data
enum Image2DProjection { E57_NO_PROJECTION = 0, //!< No representation for the image data is present E57_VISUAL = 1, //!< VisualReferenceRepresentation for the image data E57_PINHOLE = 2, //!< PinholeRepresentation for the image data E57_SPHERICAL = 3, //!< SphericalRepresentation for the image data E57_CYLINDRICAL = 4 //!< CylindricalRepresentation for the image data };
imageIndex | This in the index into the image2D vector |
imageProjection | identifies the projection in the image2D. |
imageType | identifies the image format of the projection. |
imageWidth | The image width (in pixels). |
imageHeight | The image height (in pixels). |
imageSize | This is the total number of bytes for the image blob. |
imageMaskType | This is E57_PNG_IMAGE_MASK if "imageMask" is defined in the projection |
imageVisualType | This is image type of the VisualReferenceRepresentation if given. |
VectorNode Reader::GetRawData3D | ( | void | ) |
StructureNode Reader::GetRawE57Root | ( | void | ) |
VectorNode Reader::GetRawImages2D | ( | void | ) |
bool Reader::ReadData3D | ( | int32_t | dataIndex, |
Data3D & | data3DHeader | ||
) | const |
bool Reader::ReadData3DGroupsData | ( | int32_t | dataIndex, |
int32_t | groupCount, | ||
int64_t * | idElementValue, | ||
int64_t * | startPointIndex, | ||
int64_t * | pointCount | ||
) | const |
This funtion writes out the group data.
dataIndex | data block index given by the NewData3D |
groupCount | size of each of the buffers given |
idElementValue | index for this group |
startPointIndex | Starting index in to the "points" data vector for the groups |
pointCount | size of the groups given |
bool Reader::ReadImage2D | ( | int32_t | imageIndex, |
Image2D & | image2DHeader | ||
) | const |
This function returns the image2D header and positions the cursor.
imageIndex | This in the index into the image2D vector |
image2DHeader | pointer to the Image2D structure to receive the picture information |
int64_t Reader::ReadImage2DData | ( | int32_t | imageIndex, |
e57::Image2DProjection | imageProjection, | ||
e57::Image2DType | imageType, | ||
void * | pBuffer, | ||
int64_t | start, | ||
int64_t | count | ||
) | const |
This function reads the block.
imageIndex | picture block index |
imageProjection | identifies the projection desired. |
imageType | identifies the image format desired. |
pBuffer | pointer the raw image buffer |
start | position in the block to start reading |
count | size of desired chuck or buffer size |
CompressedVectorReader Reader::SetUpData3DPointsData | ( | int32_t | dataIndex, |
int64_t | pointCount, | ||
double * | cartesianX, | ||
double * | cartesianY, | ||
double * | cartesianZ, | ||
int8_t * | cartesianInvalidState = NULL , |
||
double * | intensity = NULL , |
||
int8_t * | isIntensityInvalid = NULL , |
||
uint16_t * | colorRed = NULL , |
||
uint16_t * | colorGreen = NULL , |
||
uint16_t * | colorBlue = NULL , |
||
int8_t * | isColorInvalid = NULL , |
||
double * | sphericalRange = NULL , |
||
double * | sphericalAzimuth = NULL , |
||
double * | sphericalElevation = NULL , |
||
int8_t * | sphericalInvalidState = NULL , |
||
int32_t * | rowIndex = NULL , |
||
int32_t * | columnIndex = NULL , |
||
int8_t * | returnIndex = NULL , |
||
int8_t * | returnCount = NULL , |
||
double * | timeStamp = NULL , |
||
int8_t * | isTimeStampInvalid = NULL |
||
) | const |
This function sets up the point data fields.
All the non-NULL buffers in the call below have number of elements = pointCount. Call the CompressedVectorReader::read() until all data is read.
dataIndex | data block index given by the NewData3D |
pointCount | size of each element buffer. |
cartesianX | pointer to a buffer with the X coordinate (in meters) of the point in Cartesian coordinates |
cartesianY | pointer to a buffer with the Y coordinate (in meters) of the point in Cartesian coordinates |
cartesianZ | pointer to a buffer with the Z coordinate (in meters) of the point in Cartesian coordinates |
cartesianInvalidState | Value = 0 if the point is considered valid, 1 otherwise |
intensity | pointer to a buffer with the Point response intensity. Unit is unspecified |
isIntensityInvalid | Value = 0 if the intensity is considered valid, 1 otherwise |
colorRed | pointer to a buffer with the Red color coefficient. Unit is unspecified |
colorGreen | pointer to a buffer with the Green color coefficient. Unit is unspecified |
colorBlue | pointer to a buffer with the Blue color coefficient. Unit is unspecified |
isColorInvalid | Value = 0 if the color is considered valid, 1 otherwise |
sphericalRange | pointer to a buffer with the range (in meters) of points in spherical coordinates. Shall be non-negative |
sphericalAzimuth | pointer to a buffer with the Azimuth angle (in radians) of point in spherical coordinates |
sphericalElevation | pointer to a buffer with the Elevation angle (in radians) of point in spherical coordinates |
sphericalInvalidState | Value = 0 if the range is considered valid, 1 otherwise |
rowIndex | pointer to a buffer with the row number of point (zero based). This is useful for data that is stored in a regular grid. Shall be in the interval (0, 2^31). |
columnIndex | pointer to a buffer with the column number of point (zero based). This is useful for data that is stored in a regular grid. Shall be in the interval (0, 2^31). |
returnIndex | pointer to a buffer with the number of this return (zero based). That is, 0 is the first return, 1 is the second, and so on. Shall be in the interval (0, returnCount). Only for multi-return sensors. |
returnCount | pointer to a buffer with the total number of returns for the pulse that this corresponds to. Shall be in the interval (0, 2^7). Only for multi-return sensors. |
timeStamp | pointer to a buffer with the time (in seconds) since the start time for the data, which is given by acquisitionStart in the parent Data3D Structure. Shall be non-negative |
isTimeStampInvalid | Value = 0 if the timeStamp is considered valid, 1 otherwise |