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

Detailed Description

Rectilinear grid encoder for xml vtk files. (implementation)

Inherits Rx::FileIO::IFileDataEncode.

Public Member Functions

 CRVTKEncode_Impl ()
 Default constructor. More...
 
 ~CRVTKEncode_Impl ()
 Destructor. More...
 
virtual void AddData (size_t nDataId, const Interop::Runtime30::IMemory2DAccess *pSrcMem)
 Adds a CRxMatrix<double> as IMemory2D block to the file. The memory block contains the vector values. Supported data cases are: More...
 
virtual void AddData (size_t nDataId, const Interop::Runtime30::IMemoryAccess *pSrcMem)
 Adds a CRxArrayDouble as IMemory block to the file. The memory block contains either the values for the x,y or z axis. Supported data cases are: More...
 
virtual void Close ()
 Closes this object and writes the file. More...
 
virtual void Destroy ()
 Destroys this object. More...
 
virtual void Open (const CRxString &sxFullPath)
 Opens this object and sets the output folder for the data file to the given path. More...
 

Protected Member Functions

void AddVectorsToXmlNode (const Interop::Runtime30::IMemory2DAccess *pSrcMem, xmlNode *pxParentPieceNode)
 Adds vector values to a xml node. More...
 
xmlNode * CreateAxisXmlNode (const Interop::Runtime30::IMemoryAccess *pSrcMem, FileIO::EDataTypeVtk::ID eDataId, size_t &nAxisSegments)
 Adds values for a coordinate axis to a new xml node. More...
 
void WriteXmlDocToFile (const CRxString &sxFilePath, xmlDoc *pxXmlDoc)
 Writes a XML document to file. More...
 

Constructor & Destructor Documentation

◆ CRVTKEncode_Impl()

Rx::FileIO::CRVTKEncode_Impl::CRVTKEncode_Impl ( )

Default constructor.

◆ ~CRVTKEncode_Impl()

Rx::FileIO::CRVTKEncode_Impl::~CRVTKEncode_Impl ( )

Destructor.

Member Function Documentation

◆ AddData() [1/2]

virtual void Rx::FileIO::CRVTKEncode_Impl::AddData ( size_t  nDataId,
const Interop::Runtime30::IMemory2DAccess pSrcMem 
)
virtual

Adds a CRxMatrix<double> as IMemory2D block to the file. The memory block contains the vector values. Supported data cases are:

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

All other cases will throw an exception.

Parameters
nDataId[in] Identifier for the data.
pSrcMem[in] Source memory.

Implements Rx::FileIO::IFileDataEncode.

◆ AddData() [2/2]

virtual void Rx::FileIO::CRVTKEncode_Impl::AddData ( size_t  nDataId,
const Interop::Runtime30::IMemoryAccess pSrcMem 
)
virtual

Adds a CRxArrayDouble as IMemory block to the file. The memory block contains either the values for the x,y or z axis. 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.
pSrcMem[in] Source memory.

Implements Rx::FileIO::IFileDataEncode.

◆ AddVectorsToXmlNode()

void Rx::FileIO::CRVTKEncode_Impl::AddVectorsToXmlNode ( const Interop::Runtime30::IMemory2DAccess pSrcMem,
xmlNode *  pxParentPieceNode 
)
protected

Adds vector values to a xml node.

Parameters
pSrcMem[in] Source memory.
pxParentPieceNode[in,out] The parent piece node.

◆ Close()

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

Closes this object and writes the file.

Implements Rx::FileIO::IFileDataEncode.

◆ CreateAxisXmlNode()

xmlNode* Rx::FileIO::CRVTKEncode_Impl::CreateAxisXmlNode ( const Interop::Runtime30::IMemoryAccess pSrcMem,
FileIO::EDataTypeVtk::ID  eDataId,
size_t &  nAxisSegments 
)
protected

Adds values for a coordinate axis to a new xml node.

Parameters
pSrcMem[in] Source memory containing the data for the node.
eDataId[in] Identifier to determine which axis node should be created.
nAxisSegments[out] The amount of axis segments described by this node.
Returns
The new x coordinate axis XML node.

◆ Destroy()

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

Destroys this object.

Implements Rx::FileIO::IFileDataEncode.

◆ Open()

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

Opens this object and sets the output folder for the data file to the given path.

Parameters
sxFullPath[in] Full pathname where the file should be stored.

Implements Rx::FileIO::IFileDataEncode.

◆ WriteXmlDocToFile()

void Rx::FileIO::CRVTKEncode_Impl::WriteXmlDocToFile ( const CRxString sxFilePath,
xmlDoc *  pxXmlDoc 
)
protected

Writes a XML document to file.

Parameters
sxFilePath[in] Full pathname of the file.
pxXmlDoc[in] The XML document which should be written.