E57 Simple API V1.0.312  Aug. 10, 2012
Public Member Functions | List of all members
e57::Writer Class Reference

This is the E57 Writer class. More...

#include <E57Simple.h>

Public Member Functions

 Writer (const ustring &filePath, const ustring &coordinateMetaData)
 This function is the constructor for the writer class.
 
bool IsOpen (void) const
 This function returns true if the file is open.
 
bool Close (void) const
 This function closes the file.
 
int32_t NewImage2D (Image2D &image2DHeader) const
 This function sets up the image2D header and positions the cursor.
 
int64_t WriteImage2DData (int32_t imageIndex, e57::Image2DType imageType, e57::Image2DProjection imageProjection, void *pBuffer, int64_t start, int64_t count) const
 This function writes the image block of data.
 
int32_t NewData3D (Data3D &data3DHeader) const
 This function sets up the Data3D header and positions the cursor for the binary data.
 
CompressedVectorWriter 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 writes out blocks of point data.
 
bool WriteData3DGroupsData (int32_t dataIndex, int32_t groupCount, int64_t *idElementValue, int64_t *startPointIndex, int64_t *pointCount) const
 This funtion writes out the group data.
 
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.
 

Detailed Description

This is the E57 Writer class.

Constructor & Destructor Documentation

Writer::Writer ( const ustring &  filePath,
const ustring &  coordinateMetaData 
)

This function is the constructor for the writer class.

Parameters
filePathfile path string
coordinateMetaDataInformation describing the Coordinate Reference System to be used for the file

Member Function Documentation

VectorNode Writer::GetRawData3D ( void  )

This function returns the raw Data3D Vector Node.

Returns
Returns the raw Data3D VectorNode
StructureNode Writer::GetRawE57Root ( void  )

This function returns the file raw E57Root Structure Node.

Returns
Returns the E57Root StructureNode
VectorNode Writer::GetRawImages2D ( void  )

This function returns the raw Image2D Vector Node.

Returns
Returns the raw Image2D VectorNode
bool Writer::IsOpen ( void  ) const

This function returns true if the file is open.

Returns
Returns true if the file is open and ready.
int32_t Writer::NewData3D ( Data3D data3DHeader) const

This function sets up the Data3D header and positions the cursor for the binary data.

Returns
Returns the index of the new scan's data3D block.
Parameters
data3DHeaderpointer to the Data3D structure to receive the image information
int32_t Writer::NewImage2D ( Image2D image2DHeader) const

This function sets up the image2D header and positions the cursor.

Returns
Returns the image2D index
Parameters
image2DHeaderpointer to the Image2D structure to receive the picture information
CompressedVectorWriter Writer::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 writes out blocks of point data.

Returns
Return true if sucessful, false otherwise
Parameters
dataIndexdata block index given by the NewData3D
pointCountsize of each of the buffers given
cartesianXpointer to a buffer with the X coordinate (in meters) of the point in Cartesian coordinates
cartesianYpointer to a buffer with the Y coordinate (in meters) of the point in Cartesian coordinates
cartesianZpointer to a buffer with the Z coordinate (in meters) of the point in Cartesian coordinates
cartesianInvalidStateValue = 0 if the point is considered valid, 1 otherwise
intensitypointer to a buffer with the Point response intensity. Unit is unspecified
isIntensityInvalidValue = 0 if the intensity is considered valid, 1 otherwise
colorRedpointer to a buffer with the Red color coefficient. Unit is unspecified
colorGreenpointer to a buffer with the Green color coefficient. Unit is unspecified
colorBluepointer to a buffer with the Blue color coefficient. Unit is unspecified
isColorInvalidValue = 0 if the color is considered valid, 1 otherwise
sphericalRangepointer to a buffer with the range (in meters) of points in spherical coordinates. Shall be non-negative
sphericalAzimuthpointer to a buffer with the Azimuth angle (in radians) of point in spherical coordinates
sphericalElevationpointer to a buffer with the Elevation angle (in radians) of point in spherical coordinates
sphericalInvalidStateValue = 0 if the range is considered valid, 1 otherwise
rowIndexpointer 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).
columnIndexpointer 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).
returnIndexpointer 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.
returnCountpointer 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.
timeStamppointer 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
isTimeStampInvalidValue = 0 if the timeStamp is considered valid, 1 otherwise
bool Writer::WriteData3DGroupsData ( int32_t  dataIndex,
int32_t  groupCount,
int64_t *  idElementValue,
int64_t *  startPointIndex,
int64_t *  pointCount 
) const

This funtion writes out the group data.

Returns
Return true if sucessful, false otherwise
Parameters
dataIndexdata block index given by the NewData3D
groupCountsize of each of the buffers given
idElementValueindex for this group
startPointIndexStarting index in to the "points" data vector for the groups
pointCountsize of the groups given
int64_t Writer::WriteImage2DData ( int32_t  imageIndex,
e57::Image2DType  imageType,
e57::Image2DProjection  imageProjection,
void *  pBuffer,
int64_t  start,
int64_t  count 
) const

This function writes the image block of data.

Returns
Returns the number of bytes written
Parameters
imageIndexpicture block index given by the NewImage2D
imageTypeidentifies the image format desired.
imageProjectionidentifies the projection desired.
pBufferpointer the buffer
startposition in the block to start writing
countsize of desired chuck or buffer size

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