Raytrix Light Field SDK  5.0
Rx::FileIO::CRVTKDecode_Impl Class Reference

Detailed Description

Rectilinear grid decoder for xml vtk files. (implementation)

Inherits Rx::FileIO::IFileDataDecode.

Public Member Functions

 CRVTKDecode_Impl ()
 Default constructor. More...
 
 ~CRVTKDecode_Impl ()
 Destructor. More...
 
virtual void Close ()
 Closes this object. More...
 
virtual void Destroy ()
 Destroys this object. More...
 
virtual void GetData (size_t nDataId, Interop::Runtime30::IMemory *pTrgMem)
 Gets a CRxArrayDouble as IMemory block with data from the file. The memory block contains either the x, y or z axis values. Supported data cases are: More...
 
virtual void GetData (size_t nDataId, Interop::Runtime30::IMemory2D *pTrgMem)
 Gets a CRxMatrix of type double as IMemory2D block with data from the file. The memory block contains the vector data. Supported data cases are: More...
 
virtual void Open (const CRxString &sxFullPath)
 Opens this object. Input folder for the file is the given path. More...
 

Protected Member Functions

size_t GetAmountOfTokensInString (char *pcCont, char cDelim)
 Gets the amount of tokens of a string separated by a char. More...
 
void GetAxisValuesFromXmlNode (xmlNode *pxRectCoordsNode, size_t nAmount, FileIO::EDataTypeVtk::ID eDataId, Interop::Runtime30::IMemory *pTrgMem)
 Gets an amount of coordinate axis values from a XML node. More...
 
void GetVectorDataFromXmlNode (xmlNode *pxRectPieceNode, size_t nNumOfVectors, Interop::Runtime30::IMemory2D *pTrgMem)
 Gets the vectors from a XML node. More...
 
xmlDoc * ReadXmlDocFromFile (const CRxString &sxFilePath)
 Reads an XML document from file. More...
 

Constructor & Destructor Documentation

◆ CRVTKDecode_Impl()

Rx::FileIO::CRVTKDecode_Impl::CRVTKDecode_Impl ( )

Default constructor.

◆ ~CRVTKDecode_Impl()

Rx::FileIO::CRVTKDecode_Impl::~CRVTKDecode_Impl ( )

Destructor.

Member Function Documentation

◆ Close()

virtual void Rx::FileIO::CRVTKDecode_Impl::Close ( )
virtual

Closes this object.

Implements Rx::FileIO::IFileDataDecode.

◆ Destroy()

virtual void Rx::FileIO::CRVTKDecode_Impl::Destroy ( )
virtual

Destroys this object.

Implements Rx::FileIO::IFileDataDecode.

◆ GetAmountOfTokensInString()

size_t Rx::FileIO::CRVTKDecode_Impl::GetAmountOfTokensInString ( char *  pcCont,
char  cDelim 
)
protected

Gets the amount of tokens of a string separated by a char.

Parameters
pcCont[in] The char* string.
cDelim[in] The delimiter.
Returns
The amount of tokens in the string.

◆ GetAxisValuesFromXmlNode()

void Rx::FileIO::CRVTKDecode_Impl::GetAxisValuesFromXmlNode ( xmlNode *  pxRectCoordsNode,
size_t  nAmount,
FileIO::EDataTypeVtk::ID  eDataId,
Interop::Runtime30::IMemory pTrgMem 
)
protected

Gets an amount of coordinate axis values from a XML node.

Parameters
pxRectCoordsNode[in] The xml Coordinates node.
nAmount[in] The amount of values to pick from the node.
eDataId[in] Identifier to determine which axis data should be picked.
pTrgMem[out] The IMemory block containing the axis values.

◆ GetData() [1/2]

virtual void Rx::FileIO::CRVTKDecode_Impl::GetData ( size_t  nDataId,
Interop::Runtime30::IMemory pTrgMem 
)
virtual

Gets a CRxArrayDouble as IMemory block with data from the file. The memory block contains either the x, y or z axis values. Supported data cases are:

FileIO::EDataTypeVtk::XAxisData - segment values for the x axis

FileIO::EDataTypeVtk::YAxisData - segment values for the y axis

FileIO::EDataTypeVtk::ZAxisData - segment values for the z axis

All other cases will throw an exception.

Parameters
nDataId[in] Identifier for the data.
pTrgMem[out] Target memory.

Implements Rx::FileIO::IFileDataDecode.

◆ GetData() [2/2]

virtual void Rx::FileIO::CRVTKDecode_Impl::GetData ( size_t  nDataId,
Interop::Runtime30::IMemory2D pTrgMem 
)
virtual

Gets a CRxMatrix of type double as IMemory2D block with data from the file. The memory block contains the vector data. Supported data cases are:

FileIO::EDataTypeVtk::VectorData - 3d vector data

All other cases will throw an exception.

Parameters
nDataId[in] Identifier for the data.
pTrgMem[out] Target memory.

Implements Rx::FileIO::IFileDataDecode.

◆ GetVectorDataFromXmlNode()

void Rx::FileIO::CRVTKDecode_Impl::GetVectorDataFromXmlNode ( xmlNode *  pxRectPieceNode,
size_t  nNumOfVectors,
Interop::Runtime30::IMemory2D pTrgMem 
)
protected

Gets the vectors from a XML node.

Parameters
pxRectPieceNode[in] The Piece node containing the vector data tags.
nNumOfVectors[in] Number of vectors.
pTrgMem[out] The IMemory2D block containing the vector data.

◆ Open()

virtual void Rx::FileIO::CRVTKDecode_Impl::Open ( const CRxString sxFullPath)
virtual

Opens this object. Input folder for the file is the given path.

Parameters
sxFullPath[in] Full pathname where the file is located.

Implements Rx::FileIO::IFileDataDecode.

◆ ReadXmlDocFromFile()

xmlDoc* Rx::FileIO::CRVTKDecode_Impl::ReadXmlDocFromFile ( const CRxString sxFilePath)
protected

Reads an XML document from file.

Parameters
sxFilePath[in] Full pathname of the file.
Returns
The XML document.