MeVisLab Toolbox Reference
|
Namespace with a collection of converter tools between the libraries ML and PCL. More...
Classes | |
struct | ImageToPointCloudConversionParameters |
A container with parameters for the conversion from ML images to point clouds. More... | |
Functions | |
MLPCL_MLAdapters_EXPORT Vector3f | getVector3fFromVoxVal (MLDataType dt, const MLTypeData *voxVal) |
Tries to get any sensible Vector3f from the given voxVal if it is of any ML vector type; otherwise a zero vector is returned. More... | |
template<typename POINT_CLOUD_TYPE > | |
void | transformTo (POINT_CLOUD_TYPE &pointCloud, const Matrix4 &voxelToWorldMatrix, bool toWorld) |
Performs a voxelToWorld transformation of all point coordinates of pointCloud. More... | |
template<typename POINT_CLOUD_PTR_TYPE > | |
bool | appendSubImageVoxelsToPointCloud (const SubImage &subImg, const ImageToPointCloudConversionParameters &convParams, POINT_CLOUD_PTR_TYPE retPointCloudPtr) |
Creates a point cloud from an ML SubImage. More... | |
template<typename POINT_CLOUD_PTR_TYPE > | |
MLErrorCode | createPointCloudFromPagedImage (PagedImage &inImg, const ImageToPointCloudConversionParameters &convParams, POINT_CLOUD_PTR_TYPE &retPointCloudPtr) |
Creates a point cloud from an ML image. More... | |
template<typename POINT_TYPE > | |
void | assignPointDataFromXMarker (const XMarker &xMarker, POINT_TYPE &point) |
Generically assigns an XMarker to a any at least 3D point cloud point; only data[0] - data[2] are assigned from xMarker.pos and data[3] is set to 1. More... | |
void | assignPointDataFromXMarker (const XMarker &xMarker, pcl::PointXYZLNormal &point) |
Special version to assign an XMarker to a PointXYZLNormal point; data[0] - data[2] are assigned from xMarker.pos, data_n[0] - data_n[2] are assigned from xMarker.vec, label is cast from xMarker.type. More... | |
void | assignPointDataFromXMarker (const XMarker &xMarker, pcl::PointXYZRGBNormal &point) |
Special version to assign an XMarker to a PointXYZRGBNormal point; data[0] - data[2] are assigned from xMarker.pos, data_n[0] - data_n[2] are assigned from xMarker.vec, rgba (unit32) is cast from xMarker.type. More... | |
void | assignPointDataFromXMarker (const XMarker &xMarker, pcl::PointXYZINormal &point) |
Special version to assign an XMarker to a PointXYZINormal point; data[0] - data[2] are assigned from xMarker.pos, data_n[0] - data_n[2] are assigned from xMarker.vec, intensity is cast from xMarker.type. More... | |
template<typename POINT_CLOUD_PTR_TYPE > | |
void | createPointCloudFromBaseList (const Base *inBaseList, POINT_CLOUD_PTR_TYPE &retPointCloudPtr) |
Creates a point cloud from any of the following Base lists: PointList, VectorList, XMarkerList, or XMarkerListContainer. More... | |
template<typename POINT_TYPE > | |
void | assignXMarkerFromPointData (const POINT_TYPE &point, XMarker &xMarker) |
Generically assigns a point cloud point to an XMarker; only data[0] - data[2] are assigned from point to xMarker.pos. More... | |
void | assignXMarkerFromPointData (const pcl::PointXYZLNormal &point, XMarker &xMarker) |
Special version to assign a PointXYZLNormal point to an XMarker; data[0] - data[2] are assigned to xMarker.pos, data_n[0] - data_n[2] are assigned to xMarker.vec, label is cast to xMarker.type. More... | |
void | assignXMarkerFromPointData (const pcl::PointXYZRGBNormal &point, XMarker &xMarker) |
Special version to assign a PointXYZRGBNormal point to an XMarker; data[0] - data[2] are assigned to xMarker.pos, data_n[0] - data_n[2] are assigned to xMarker.vec, rgba (uint32) is cast to xMarker.type. More... | |
void | assignXMarkerFromPointData (const pcl::PointXYZINormal &point, XMarker &xMarker) |
Special version to assign a PointXYZINormal point to an XMarker; data[0] - data[2] are assigned to xMarker.pos, data_n[0] - data_n[2] are assigned to xMarker.vec, intensity is cast to xMarker.type. More... | |
template<typename POINT_CLOUD_TYPE > | |
void | convertPointCloudToXMarkerList (POINT_CLOUD_TYPE &inputPointCloud, XMarkerList &outputList) |
Creates a point cloud from any of the following Base lists: PointList, VectorList, XMarkerList, or XMarkerListContainer. More... | |
void | setVectorReplacement (pcl::PointXYZ &, const Vector3f &) |
If the point type has any normal-like members then any vector components of an ML vector-like voxel type are assigned to them. More... | |
template<typename PCL_POINT_TYPE > | |
void | setVectorReplacement (PCL_POINT_TYPE &p, const Vector3f &vf) |
Namespace with a collection of converter tools between the libraries ML and PCL.
|
inline |
Creates a point cloud from an ML SubImage.
subImg | The input SubImage whose voxels shall be thresholded and possibly added as points to retPointCloudPtr. |
convParams | A container describing the parameters for the image to point cloud conversion. |
retPointCloudPtr | The pointer is reset and set to the newly created point cloud. |
Definition at line 158 of file mlPCLMLTools.h.
References MLTypeInfos::castToDouble, ml::SubImage::getBox(), ml::SubImage::getData(), ml::SubImage::getDataType(), ml::SubImage::getDataTypeInfos(), ml::SubImage::getImagePointer(), ml::PCLSupportTools::getUnsigned32BitMaximumLimit(), getVector3fFromVoxVal(), ml::FloatingPointVector< T, size, DataContainer >::length(), ml::PCLMLTools::ImageToPointCloudConversionParameters::lowerValue, ML_BAD_PARAMETER, ML_PRINT_ERROR, MLIsScalarType(), ml::PCLMLTools::ImageToPointCloudConversionParameters::normalizeInClampedRange, ml::PCLSupportTools::setIntensityReplacement(), setVectorReplacement(), ml::PCLMLTools::ImageToPointCloudConversionParameters::skipVoxelsAboveMax, ml::PCLMLTools::ImageToPointCloudConversionParameters::skipVoxelsBelowMin, ml::PCLMLTools::ImageToPointCloudConversionParameters::thresholdMax, ml::PCLMLTools::ImageToPointCloudConversionParameters::thresholdMin, ml::PCLMLTools::ImageToPointCloudConversionParameters::upperValue, ml::PCLMLTools::ImageToPointCloudConversionParameters::useVectorLengthAsIntensity, ml::TSubImageBox< intT >::v1, ml::TSubImageBox< intT >::v2, ml::TVector6DBase< CompIntType >::x, ml::TVector6DBase< CompIntType >::y, and ml::TVector6DBase< CompIntType >::z.
Referenced by createPointCloudFromPagedImage().
|
inline |
Special version to assign an XMarker to a PointXYZINormal point;
data[0] - data[2] are assigned from xMarker.pos, data_n[0] - data_n[2] are assigned from xMarker.vec, intensity is cast from xMarker.type.
data[2] is set to 1, data_n[3] is set to 0, curvature is left unchanged.
Definition at line 367 of file mlPCLMLTools.h.
References ml::XMarker::pos, ml::XMarker::type, and ml::XMarker::vec.
Referenced by createPointCloudFromBaseList().
|
inline |
Special version to assign an XMarker to a PointXYZLNormal point;
data[0] - data[2] are assigned from xMarker.pos, data_n[0] - data_n[2] are assigned from xMarker.vec, label is cast from xMarker.type.
data[2] is set to 1, data_n[3] is set to 0, curvature is left unchanged.
Definition at line 327 of file mlPCLMLTools.h.
References ml::XMarker::pos, ml::XMarker::type, and ml::XMarker::vec.
|
inline |
Special version to assign an XMarker to a PointXYZRGBNormal point;
data[0] - data[2] are assigned from xMarker.pos, data_n[0] - data_n[2] are assigned from xMarker.vec, rgba (unit32) is cast from xMarker.type.
data[2] is set to 1, data_n[3] is set to 0, curvature is left unchanged.
Definition at line 347 of file mlPCLMLTools.h.
References ml::XMarker::pos, ml::XMarker::type, and ml::XMarker::vec.
|
inline |
Generically assigns an XMarker to a any at least 3D point cloud point; only data[0] - data[2] are assigned from xMarker.pos and data[3] is set to 1.
Definition at line 312 of file mlPCLMLTools.h.
References ml::XMarker::pos.
|
inline |
Special version to assign a PointXYZINormal point to an XMarker;
data[0] - data[2] are assigned to xMarker.pos, data_n[0] - data_n[2] are assigned to xMarker.vec, intensity is cast to xMarker.type.
Definition at line 508 of file mlPCLMLTools.h.
References ml::XMarker::pos, ml::XMarker::type, and ml::XMarker::vec.
Referenced by convertPointCloudToXMarkerList().
|
inline |
Special version to assign a PointXYZLNormal point to an XMarker;
data[0] - data[2] are assigned to xMarker.pos, data_n[0] - data_n[2] are assigned to xMarker.vec, label is cast to xMarker.type.
Definition at line 474 of file mlPCLMLTools.h.
References ml::XMarker::pos, ml::XMarker::type, and ml::XMarker::vec.
|
inline |
Special version to assign a PointXYZRGBNormal point to an XMarker;
data[0] - data[2] are assigned to xMarker.pos, data_n[0] - data_n[2] are assigned to xMarker.vec, rgba (uint32) is cast to xMarker.type.
Definition at line 491 of file mlPCLMLTools.h.
References ml::XMarker::pos, ml::XMarker::type, and ml::XMarker::vec.
|
inline |
Generically assigns a point cloud point to an XMarker; only data[0] - data[2] are assigned from point to xMarker.pos.
Definition at line 461 of file mlPCLMLTools.h.
References ml::XMarker::pos.
|
inline |
Creates a point cloud from any of the following Base lists: PointList, VectorList, XMarkerList, or XMarkerListContainer.
inputPointCloud | The point cloud to be converted to outputList. |
outputList | The result list containing as many entries as the point cloud has entries. |
Definition at line 527 of file mlPCLMLTools.h.
References assignXMarkerFromPointData(), and ml::BaseListTemplate< T >::getItemAt().
|
inline |
Creates a point cloud from any of the following Base lists: PointList, VectorList, XMarkerList, or XMarkerListContainer.
inBaseList | The input Base pointer whose list contents shall be converted to retPointCloudPtr, may be nullptr. |
retPointCloudPtr | If a valid Base object is connected then this pointer is set to a newly created point set with the same number of entries as the corresponding input Base list; if no valid Base object is connected then this pointer will be reset to nullptr. |
Definition at line 391 of file mlPCLMLTools.h.
References assignPointDataFromXMarker(), ml::BaseListTemplate< T >::getConstItemAt(), ml::PointList::getNum(), ml::VectorList::getNum(), ml::VectorList::getPoint(), ml::PCLSupportTools::getUnsigned32BitMaximumLimit(), ml::PointList::getValue(), ML_BAD_PARAMETER, and ML_PRINT_ERROR.
|
inline |
Creates a point cloud from an ML image.
inImg | The input paged image whose voxels shall be thresholded and possibly added as points to retPointCloudPtr. |
convParams | A container describing the parameters for the image to point cloud conversion. |
retPointCloudPtr | The pointer is reset and set to the newly created point cloud. |
Definition at line 276 of file mlPCLMLTools.h.
References ml::SubImage::allocateAsMemoryBlockHandle(), appendSubImageVoxelsToPointCloud(), ml::ImageProperties::getBoxFromImageExtent(), ml::SubImage::getData(), ml::ImageProperties::getDataType(), ml::SubImage::getExtent(), ml::SubImage::getNumVoxels(), ml::PagedImage::getTile(), ml::PCLSupportTools::getUnsigned32BitMaximumLimit(), ml::MedicalImageProperties::getVoxelToWorldMatrix(), ML_NO_MEMORY, ML_RESULT_OK, ML_RETURN_NULL, transformTo(), ml::PCLMLTools::ImageToPointCloudConversionParameters::transformToWorld, ml::TVector6DBase< CompIntType >::x, ml::TVector6DBase< CompIntType >::y, and ml::TVector6DBase< CompIntType >::z.
MLPCL_MLAdapters_EXPORT Vector3f ml::PCLMLTools::getVector3fFromVoxVal | ( | MLDataType | dt, |
const MLTypeData * | voxVal | ||
) |
Tries to get any sensible Vector3f from the given voxVal if it is of any ML vector type; otherwise a zero vector is returned.
Referenced by appendSubImageVoxelsToPointCloud().
|
inline |
If the point type has any normal-like members then any vector components of an ML vector-like voxel type are assigned to them.
If the pcl voxel type does not have appropriate members then nothing is assigned for example such in pcl::PointXYZ.
Definition at line 48 of file mlPCLMLTools.h.
|
inline |
Definition at line 55 of file mlPCLMLTools.h.
Referenced by appendSubImageVoxelsToPointCloud().
|
inline |
Performs a voxelToWorld transformation of all point coordinates of pointCloud.
pointCloud | The point cloud whose point coordinates shall be transformed. |
voxelToWorldMatrix | The ML homogeneous matrix transforming voxel to world coordinates. |
toWorld | If true then a voxelToWorld transformation is performed, otherwise a worldToVoxel transformation, |
Definition at line 123 of file mlPCLMLTools.h.
References ml::Tvec3< DT >::assign(), ml::MedicalImageProperties::mapVoxelToWorld(), ml::MedicalImageProperties::mapWorldToVoxel(), and ml::MedicalImageProperties::setVoxelToWorldMatrix().
Referenced by createPointCloudFromPagedImage().