MeVisLab Toolbox Reference
mlPCLInventorTools.h File Reference

Converter tools between the libraries Open Inventor and PCL. More...

#include "MLPCLInventorAdaptersSystem.h"
#include <mlPCLTypes.h>
#include <mlPCLSupportTools.h>
#include <mlErrorMacros.h>
#include <mlRangeCasts.h>
#include <PCLThirdPartyWarningsDisable.h>
#include <Inventor/nodes/SoVertexProperty.h>
#include <PCLThirdPartyWarningsRestore.h>

Go to the source code of this file.

Namespaces

namespace  ml
 Main documentation file for ML users and developers.
 
namespace  ml::PCLInventorTools
 Namespace with a collection of converter tools between the libraries Open Inventor and PCL.
 

Macros

#define SpecializedPCLPointXYZ   pcl::PointXYZ
 Eigen makes strange stuff with some types on some windows platforms which makes some specializations fail on VC10-32.
 

Enumerations

enum  ml::PCLInventorTools::PCLMFVecStorageTypes {
  ml::PCLInventorTools::StoreIntensitReplacementAsRGB = 0 , ml::PCLInventorTools::StoreIntensitReplacementAsRGBA , ml::PCLInventorTools::UseOnlyRGBA , ml::PCLInventorTools::CopyFromData ,
  ml::PCLInventorTools::CopyFromData_n , ml::PCLInventorTools::CopyDataAndData_n
}
 Describes the way how data combinations of a point cloud are stored in an OpenInventor MFVec field. More...
 

Functions

void ml::PCLInventorTools::setOneMFVecFieldValue (SbVec2f *dstVal, const float data[4])
 Writes data[0] and data[1] to dstVal; data[2] and data[3] are ignored.
 
void ml::PCLInventorTools::setOneMFVecFieldValue (SbVec2f *dstVal, const unsigned int *)
 Implemented for completeness to match all possible template variant, which, however, is not clearly defined, thus it writes (0.f, 0.f) into all entries of *dstVal.
 
void ml::PCLInventorTools::setOneMFVecFieldValue (SbVec2f *dstVal, float data)
 Writes data in the two components of the idx'th value of mField.
 
void ml::PCLInventorTools::setOneMFVecFieldValue (SbVec3f *dstVal, const float data[4])
 Writes data[0], data[1], and data[2] to dstVal; data[3] is ignored.
 
void ml::PCLInventorTools::setOneMFVecFieldValue (SbVec3f *dstVal, const unsigned int *)
 Implemented for completeness to match all possible template variant, which, however, is not clearly defined, thus it writes (0.f, 0.f, 0.f) into all entries of *dstVal.
 
void ml::PCLInventorTools::setOneMFVecFieldValue (SbVec3f *dstVal, float data)
 Writes data in all three components of the idx'th value of mField.
 
void ml::PCLInventorTools::setOneMFVecFieldValue (MLuint32 *dstVal, const float data)
 Special version writing a float to be from [0,256[ as RGBA value with same components
into the idx'th value of mField.
 
void ml::PCLInventorTools::setOneMFVecFieldValue (MLuint32 *dstVal, const float data[4])
 Writes data[0] - data[3] into the idx'th value of mField, data must have at least four values; all other arguments are ignored.
 
void ml::PCLInventorTools::setOneMFVecFieldValue (MLuint32 *dstVal, const unsigned int *rgbaVal)
 Writes swapped *rgbaVal into *dstVal.
 
template<typename DST_VAL_TYPE >
void ml::PCLInventorTools::setOneMFVecFieldValueFromPoint (DST_VAL_TYPE *dstVal, const SpecializedPCLPointXYZ &pnt, bool useData_n)
 Explicit case for PointXYZ (which does not have data_n members) to copy pnt.data[0-2] or pnt.data_n[0-2] dependent on useData_n to dstVal; for useData_n == TRUE (0,0,0) is written.
 
template<typename POINT_TYPE , typename DST_VAL_TYPE >
void ml::PCLInventorTools::setOneMFVecFieldValueFromPoint (DST_VAL_TYPE *dstVal, const POINT_TYPE &pnt, bool useData_n)
 Generic function to copy pnt.data[0-2] or pnt.data_n[0-2] (dependent on useData_n) to dstVal.
 
template<typename DST_VAL_TYPE >
void ml::PCLInventorTools::setTwoMFVecFieldValuesFromPoint (DST_VAL_TYPE *dstVal, const SpecializedPCLPointXYZ &pnt)
 Explicit case for pclPointXYZ which copies pnt.data[0-2] to dstVal and dstVal+1.
 
template<typename POINT_TYPE , typename DST_VAL_TYPE >
void ml::PCLInventorTools::setTwoMFVecFieldValuesFromPoint (DST_VAL_TYPE *dstVal, const POINT_TYPE &pnt)
 Generic function to copy data[0-2] to dstVal and data[0-2}+data_n[0-2] to dstVal+1.
 
MLPCL_InventorAdapters_EXPORT void ml::PCLInventorTools::getRainbowRGB_From0_to_1 (float intensity, float retRGB[3])
 Maps an intensity value from [0,1] to an RGB rainbow value where 0 is mapped to red increasing to green and finally to blue and violet; values outside [0,1] are clamped to the interval borders.
 
template<typename POINT_CLOUD_TYPE , typename SM_MF_VEC_FIELD_TYPE >
size_t ml::PCLInventorTools::setMFVecFromPointCloud (const POINT_CLOUD_TYPE &pointCloud, SM_MF_VEC_FIELD_TYPE &mfvecField, PCLMFVecStorageTypes storageType, bool duplicateColors=false, bool mapToRainbow=false, bool useCurvatureForColor=false, bool scaleFromInputRange=false, float inRangeMin=0.f, float inRangeMax=1.f)
 Converts the point cloud to an Inventor SoMFVec2f, SoMFVec3f, or SoMFUInt32 field; it does not necessarily touch the modified field since it uses Inventor field editing.
 
MLPCL_InventorAdapters_EXPORT void ml::PCLInventorTools::setVertices (const std::vector< pcl::Vertices > &verticesVector, SoMFInt32 &mfIntField, bool terminateWithMinusOne)
 For each entry of verticesVector all indexes of are appended mfIntField and - if terminateWithMinusOne is true - a -1 is also appended.
 

Detailed Description

Converter tools between the libraries Open Inventor and PCL.

Author
"Wolf Spindler"
Date
2015-12-18

Converter tools between the libraries Open Inventor and PCL.

Definition in file mlPCLInventorTools.h.

Macro Definition Documentation

◆ SpecializedPCLPointXYZ

#define SpecializedPCLPointXYZ   pcl::PointXYZ

Eigen makes strange stuff with some types on some windows platforms which makes some specializations fail on VC10-32.

Therefore we need to make use of the changed types of Eigen, too, to make compile the specializations of pcl::PointXYZ of setOneMFVecFieldValueFromPoint and setTwoMFVecFieldValuesFromPoint.

Definition at line 156 of file mlPCLInventorTools.h.