Raytrix Light Field SDK  5.0
Rx::LFR::CExport Class Reference

Detailed Description

Provides methods for exporting mesh data and point lists to various formats.

Inherits Rx::LFR::CPimpl< CExport_Impl, Interfaces::EExport::ID >.

Public Member Functions

 CExport ()
 Default constructor. More...
 
 CExport (CExport &&xExport)
 Move constructor. More...
 
 ~CExport ()
 Destructor. More...
 
CExport_Impl & GetImpl ()
 Gets the non constant implementation. More...
 
const CExport_Impl & GetImpl () const
 Gets the constant implementation. More...
 
void * GetInterface (Interfaces::EExport::ID eInterface)
 Gets the interface defined by the given interface ID. More...
 
TInterface * GetInterface (Interfaces::EExport::ID eInterface)
 Gets the interface defined by the given interface ID. More...
 
const void * GetInterface (Interfaces::EExport::ID eInterface) const
 Gets the interface defined by the given interface ID. More...
 
const TInterface * GetInterface (Interfaces::EExport::ID eInterface) const
 Gets the interface defined by the given interface ID. More...
 
bool HasInterface (Interfaces::EExport::ID eInterface)
 Queries if this object has the given interface. More...
 
CExportoperator= (CExport &&xExporter)
 Move assignment operator. More...
 

Static Public Member Functions

static void SaveMeshPLY (const CRxString &sxFile, const CRxImage &xImgFocus, const CRxImage &xImgDepth3D, bool bUseVD, const double *pdCropXYZ=nullptr)
 Saves the 3D mesh provided by the given 3D depth image to binary PLY format. Uses the Total Focus image as color values for each point in the data. More...
 
static void SaveMeshSTL (const CRxString &sxFile, const CRxImage &xImgDepth3D, bool bUseVD, double dMaxEdgeLength, const double *pdCropXY=nullptr)
 Saves the 3D mesh provided by the given 3D depth image to binary STL format. More...
 
static void SavePointListPCD (const CRxString &sxFile, const CRxArray< float > &afPositions, const CRxArray< char > &afColors)
 Saves the 3D point list to binary PCD format. More...
 
static void SavePointListPCD (const CRxString &sxFile, const CRxImage &xImgDepth3D, bool bUseVD, const double *pdCropXY=nullptr)
 Saves the 3D point list provided by the given 3D depth image to binary PCD format. More...
 
static void SavePointListPCD (const CRxString &sxFile, const CRxImage &xImgFocus, const CRxImage &xImgDepth3D, bool bUseVD, const double *pdCropXY=nullptr)
 Saves the 3D point list provided by the given 3D depth image to binary PCD format. Uses the Total Focus image as color values for each point in the data. More...
 
static void SavePointListTXT (const CRxString &sxFile, const CRxImage &xImgDepth3D, bool bUseVD, const double *pdCropXY=nullptr)
 Saves the 3D point list provided by the given 3D depth image to ASCII TXT format. More...
 
static void SavePointListXYZ (const CRxString &sxFile, const CRxImage &xImgDepth3D, bool bUseVD, const double *pdCropXY=nullptr)
 Saves the 3D point list provided by the given 3D depth image to ASCII XYZ format. More...
 

Constructor & Destructor Documentation

◆ CExport() [1/2]

Rx::LFR::CExport::CExport ( )

Default constructor.

◆ CExport() [2/2]

Rx::LFR::CExport::CExport ( CExport &&  xExport)

Move constructor.

Parameters
xExport[in,out] The exporter.

◆ ~CExport()

Rx::LFR::CExport::~CExport ( )

Destructor.

Member Function Documentation

◆ GetImpl() [1/2]

CExport_Impl & Rx::LFR::CPimpl< CExport_Impl , Interfaces::EExport::ID >::GetImpl
inlineinherited

Gets the non constant implementation.

Returns
The implementation.

◆ GetImpl() [2/2]

const CExport_Impl & Rx::LFR::CPimpl< CExport_Impl , Interfaces::EExport::ID >::GetImpl
inlineinherited

Gets the constant implementation.

Returns
The implementation.

◆ GetInterface() [1/4]

void* Rx::LFR::CPimpl< CExport_Impl , Interfaces::EExport::ID >::GetInterface ( Interfaces::EExport::ID  eInterface)
inherited

Gets the interface defined by the given interface ID.

Parameters
eInterface[in] The interface ID.
Returns
Null if it fails, else the interface.

◆ GetInterface() [2/4]

TInterface* Rx::LFR::CPimpl< CExport_Impl , Interfaces::EExport::ID >::GetInterface ( Interfaces::EExport::ID  eInterface)
inlineinherited

Gets the interface defined by the given interface ID.

Template Parameters
TInterface[in] The interface type.
Parameters
eInterface[in] The interface.
Returns
Null if it fails, else the interface.

◆ GetInterface() [3/4]

const void* Rx::LFR::CPimpl< CExport_Impl , Interfaces::EExport::ID >::GetInterface ( Interfaces::EExport::ID  eInterface) const
inherited

Gets the interface defined by the given interface ID.

Parameters
eInterface[in] The interface ID.
Returns
Null if it fails, else the interface.

◆ GetInterface() [4/4]

const TInterface* Rx::LFR::CPimpl< CExport_Impl , Interfaces::EExport::ID >::GetInterface ( Interfaces::EExport::ID  eInterface) const
inlineinherited

Gets the interface defined by the given interface ID.

Template Parameters
TInterface[in] The interface type.
Parameters
eInterface[in] The interface ID.
Returns
Null if it fails, else the interface.

◆ HasInterface()

bool Rx::LFR::CPimpl< CExport_Impl , Interfaces::EExport::ID >::HasInterface ( Interfaces::EExport::ID  eInterface)
inlineinherited

Queries if this object has the given interface.

Parameters
eInterface[in] The interface to query.
Returns
True if this class has the given interface, false if not.

◆ operator=()

CExport& Rx::LFR::CExport::operator= ( CExport &&  xExporter)

Move assignment operator.

Parameters
xExporter[in,out] The exporter.
Returns
The instance.

◆ SaveMeshPLY()

static void Rx::LFR::CExport::SaveMeshPLY ( const CRxString sxFile,
const CRxImage xImgFocus,
const CRxImage xImgDepth3D,
bool  bUseVD,
const double *  pdCropXYZ = nullptr 
)
static

Saves the 3D mesh provided by the given 3D depth image to binary PLY format. Uses the Total Focus image as color values for each point in the data.

Parameters
sxFile[in] The output file name.
xImgFocus[in] The total focus image used as color values for each vertex in the mesh. Must be of type RGBA unsigned char or luminance unsigned char.
xImgDepth3D[in] The 3D depth image. Must be of type RGBA float.
bUseVD[in] True to save the mesh in virtual depth units instead of metric units.
pdCropXYZ(Optional) [in] Pointer to 6 double values defining a mesh crop in X, Y and Z. The first 4 double values must be given in percentage of the image dimension in the order: Left, Right, Top, Bottom. The next 2 values must be given as absolute depth values in the order: Minimum, Maximum. If both values are 0, no depth crop is applied.

◆ SaveMeshSTL()

static void Rx::LFR::CExport::SaveMeshSTL ( const CRxString sxFile,
const CRxImage xImgDepth3D,
bool  bUseVD,
double  dMaxEdgeLength,
const double *  pdCropXY = nullptr 
)
static

Saves the 3D mesh provided by the given 3D depth image to binary STL format.

Parameters
sxFile[in] The output file name.
xImgDepth3D[in] The 3D depth image. Must be of type RGBA float.
bUseVD[in] True to save the mesh in virtual depth units instead of metric units.
dMaxEdgeLength[in] Vertices with a depth-variation larger than this value for at least one vertex pair are not added to the mesh.
pdCropXY(Optional) [in] Pointer to 4 double values defining a mesh crop in X and Y. The values must be given in percentage of the image dimension in the order: Left, Right, Top, Bottom.

◆ SavePointListPCD() [1/3]

static void Rx::LFR::CExport::SavePointListPCD ( const CRxString sxFile,
const CRxArray< float > &  afPositions,
const CRxArray< char > &  afColors 
)
static

Saves the 3D point list to binary PCD format.

Point Cloud Data: http://pointclouds.org/documentation/tutorials/pcd_file_format.php.

Parameters
sxFileFilename for output (filename extension has to be '.pcd').
afPositionsThe positions to be written (size must be a multiple of 3).
afColorsThe colors for each point (size must be a multiple of 4 and contain the same amount of points as positions).

◆ SavePointListPCD() [2/3]

static void Rx::LFR::CExport::SavePointListPCD ( const CRxString sxFile,
const CRxImage xImgDepth3D,
bool  bUseVD,
const double *  pdCropXY = nullptr 
)
static

Saves the 3D point list provided by the given 3D depth image to binary PCD format.

Point Cloud Data: http://pointclouds.org/documentation/tutorials/pcd_file_format.php.

Parameters
sxFile[in] The output file name.
xImgDepth3D[in] The 3D depth image. Must be of type RGBA float.
bUseVD[in] True to save the mesh in virtual depth units instead of metric units.
pdCropXY(Optional) [in] Pointer to 4 double values defining a mesh crop in X and Y. The values must be given in percentage of the image dimension in the order: Left, Right, Top, Bottom.

◆ SavePointListPCD() [3/3]

static void Rx::LFR::CExport::SavePointListPCD ( const CRxString sxFile,
const CRxImage xImgFocus,
const CRxImage xImgDepth3D,
bool  bUseVD,
const double *  pdCropXY = nullptr 
)
static

Saves the 3D point list provided by the given 3D depth image to binary PCD format. Uses the Total Focus image as color values for each point in the data.

Point Cloud Data: http://pointclouds.org/documentation/tutorials/pcd_file_format.php.

Parameters
sxFile[in] The output file name.
xImgFocus[in] The total focus image used as color values for each point in the data. Must be of type RGBA unsigned char or luminance unsigned char.
xImgDepth3D[in] The 3D depth image. Must be of type RGBA float.
bUseVD[in] True to save the mesh in virtual depth units instead of metric units.
pdCropXY(Optional) [in] Pointer to 4 double values defining a mesh crop in X and Y. The values must be given in percentage of the image dimension in the order: Left, Right, Top, Bottom.

◆ SavePointListTXT()

static void Rx::LFR::CExport::SavePointListTXT ( const CRxString sxFile,
const CRxImage xImgDepth3D,
bool  bUseVD,
const double *  pdCropXY = nullptr 
)
static

Saves the 3D point list provided by the given 3D depth image to ASCII TXT format.

Parameters
sxFile[in] The output file name.
xImgDepth3D[in] The 3D depth image. Must be of type RGBA float.
bUseVD[in] True to save the mesh in virtual depth units instead of metric units.
pdCropXY(Optional) [in] Pointer to 4 double values defining a mesh crop in X and Y. The values must be given in percentage of the image dimension in the order: Left, Right, Top, Bottom.

◆ SavePointListXYZ()

static void Rx::LFR::CExport::SavePointListXYZ ( const CRxString sxFile,
const CRxImage xImgDepth3D,
bool  bUseVD,
const double *  pdCropXY = nullptr 
)
static

Saves the 3D point list provided by the given 3D depth image to ASCII XYZ format.

Parameters
sxFile[in] The output file name.
xImgDepth3D[in] The 3D depth image. Must be of type RGBA float.
bUseVD[in] True to save the mesh in virtual depth units instead of metric units.
pdCropXY(Optional) [in] Pointer to 4 double values defining a mesh crop in X and Y. The values must be given in percentage of the image dimension in the order: Left, Right, Top, Bottom.