Raytrix Light Field SDK  v3.1
Logo
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Events Groups Pages
Rx::FileIO::CUVTKDecode_Impl Class Reference

Detailed Description

Unstructured grid decoder for a series of xl vtk files. (implementation)

Inherits Rx::FileIO::IFileDataFramesDecode.

Public Member Functions

 CUVTKDecode_Impl ()
 Default constructor. More...
 
 ~CUVTKDecode_Impl ()
 Destructor. More...
 
virtual void Close ()
 Closes this object. More...
 
virtual void Destroy ()
 Destroys this object. More...
 
virtual void GetData (size_t nDataId, double &dData)
 Gets the time step for the current open frame as double. Supported data cases are: More...
 
virtual void GetData (size_t nDataId, Rx::Interop::Runtime30::IMemory *pTrgMem)
 Not supported for this file type. Will throw an exception if called with any case. More...
 
virtual void GetData (size_t nDataId, Rx::Interop::Runtime30::IMemory2D *pTrgMem)
 Gets a Rx::CRxMatrix<double> as IMemory2D block from the current frame. The memory block contains either the point or the vector data. Supported data cases are: More...
 
virtual void JumpToFrame (size_t nFrameNbr)
 Opens the specified frame and reads it. When the frame not exists an exception will be thrown. More...
 
virtual bool NextFrame ()
 When there is a next frame, this function opens and reads it. Because Open() already opens the first frame all following frames need to be processed via do-while. More...
 
virtual void Open (const Rx::CRxString &sxFullPath)
 Opens this object. Input folder for the files is the given path. This function will open the first frame. Because of that all following frames need to be processed via do-while. More...
 

Protected Member Functions

void GetPointsFromXmlNode (xmlNode *pxPieceNode, Rx::Interop::Runtime30::IMemory2D *pTrgMem)
 Gets the points from a XML node. More...
 
void GetVectorsFromXmlNode (xmlNode *pxPieceNode, Rx::Interop::Runtime30::IMemory2D *pTrgMem)
 Gets the vectors from a XML node. More...
 
xmlDoc * ReadXmlDocFromFile (const Rx::CRxString &sxFilePath)
 Reads an XML document from file. More...
 

Constructor & Destructor Documentation

Rx::FileIO::CUVTKDecode_Impl::CUVTKDecode_Impl ( )

Default constructor.

Rx::FileIO::CUVTKDecode_Impl::~CUVTKDecode_Impl ( )

Destructor.

Member Function Documentation

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

Closes this object.

Implements Rx::FileIO::IFileDataFramesDecode.

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

Destroys this object.

Implements Rx::FileIO::IFileDataFramesDecode.

virtual void Rx::FileIO::CUVTKDecode_Impl::GetData ( size_t  nDataId,
double &  dData 
)
virtual

Gets the time step for the current open frame as double. Supported data cases are:

Rx::FileIO::EDataTypeVtk::TimestepData - current time step data

All other cases will throw an exception.

Parameters
nDataId[in] Identifier for the data.
dData[out] The time step data.

Implements Rx::FileIO::IFileDataFramesDecode.

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

Not supported for this file type. Will throw an exception if called with any case.

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

Implements Rx::FileIO::IFileDataFramesDecode.

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

Gets a Rx::CRxMatrix<double> as IMemory2D block from the current frame. The memory block contains either the point or the vector data. Supported data cases are:

Rx::FileIO::EDataTypeVtk::PointData - 3d point data

Rx::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::IFileDataFramesDecode.

void Rx::FileIO::CUVTKDecode_Impl::GetPointsFromXmlNode ( xmlNode *  pxPieceNode,
Rx::Interop::Runtime30::IMemory2D pTrgMem 
)
protected

Gets the points from a XML node.

Parameters
pxPieceNode[in] The Piece node containing the data tags.
pTrgMem[out] The IMemory2D block containing the point data.
void Rx::FileIO::CUVTKDecode_Impl::GetVectorsFromXmlNode ( xmlNode *  pxPieceNode,
Rx::Interop::Runtime30::IMemory2D pTrgMem 
)
protected

Gets the vectors from a XML node.

Parameters
pxPieceNode[in] The Piece node containing the vector data tags.
pTrgMem[out] The IMemory2D block containing the vector data.
virtual void Rx::FileIO::CUVTKDecode_Impl::JumpToFrame ( size_t  nFrameNbr)
virtual

Opens the specified frame and reads it. When the frame not exists an exception will be thrown.

Parameters
nFrameNbr[in] The frame number.

Implements Rx::FileIO::IFileDataFramesDecode.

virtual bool Rx::FileIO::CUVTKDecode_Impl::NextFrame ( )
virtual

When there is a next frame, this function opens and reads it. Because Open() already opens the first frame all following frames need to be processed via do-while.

Returns
True if there is a next frame, false otherwise.

Implements Rx::FileIO::IFileDataFramesDecode.

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

Opens this object. Input folder for the files is the given path. This function will open the first frame. Because of that all following frames need to be processed via do-while.

Parameters
sxFullPath[in] Full pathname where all files are located.

Implements Rx::FileIO::IFileDataFramesDecode.

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

Reads an XML document from file.

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