|
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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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 appendSubImageVoxelsToPointCloud(), MLTypeInfos::castToDouble, ml::SubImage::getBox(), ml::SubImage::getData(), ml::SubImage::getDataType(), ml::SubImage::getDataTypeInfos(), ml::SubImage::getImagePointer(), getVector3fFromVoxVal(), ml::FloatingPointVector< T, size, DataContainer >::length(), ml::PCLMLTools::ImageToPointCloudConversionParameters::lowerValue, ML_BAD_PARAMETER, ML_PRINT_ERROR, MLIsScalarType(), ml::PCLMLTools::ImageToPointCloudConversionParameters::normalizeInClampedRange, 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, and ml::TSubImageBox< intT >::v2.
Referenced by appendSubImageVoxelsToPointCloud(), and 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 assignPointDataFromXMarker(), ml::XMarker::pos, ml::XMarker::type, and ml::XMarker::vec.
|
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 assignPointDataFromXMarker(), 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 assignPointDataFromXMarker(), 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 assignPointDataFromXMarker(), and ml::XMarker::pos.
Referenced by assignPointDataFromXMarker(), assignPointDataFromXMarker(), assignPointDataFromXMarker(), assignPointDataFromXMarker(), and createPointCloudFromBaseList().
|
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 assignXMarkerFromPointData(), ml::XMarker::pos, ml::XMarker::type, and ml::XMarker::vec.
|
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 assignXMarkerFromPointData(), 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 assignXMarkerFromPointData(), 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 assignXMarkerFromPointData(), and ml::XMarker::pos.
Referenced by assignXMarkerFromPointData(), assignXMarkerFromPointData(), assignXMarkerFromPointData(), assignXMarkerFromPointData(), and convertPointCloudToXMarkerList().
|
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(), convertPointCloudToXMarkerList(), and ml::BaseListTemplate< T >::getItemAt().
Referenced by convertPointCloudToXMarkerList().
|
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(), createPointCloudFromBaseList(), ml::BaseListTemplate< T >::getConstItemAt(), ml::PointList::getNum(), ml::VectorList::getNum(), ml::VectorList::getPoint(), ml::PointList::getValue(), ML_BAD_PARAMETER, and ML_PRINT_ERROR.
Referenced by createPointCloudFromBaseList().
|
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(), createPointCloudFromPagedImage(), ml::ImageProperties::getBoxFromImageExtent(), ml::SubImage::getData(), ml::ImageProperties::getDataType(), ml::SubImage::getExtent(), ml::SubImage::getNumVoxels(), ml::PagedImage::getTile(), ml::MedicalImageProperties::getVoxelToWorldMatrix(), ML_NO_MEMORY, ML_RESULT_OK, ML_RETURN_NULL, transformTo(), and ml::PCLMLTools::ImageToPointCloudConversionParameters::transformToWorld.
Referenced by createPointCloudFromPagedImage().
| 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.
References getVector3fFromVoxVal().
Referenced by appendSubImageVoxelsToPointCloud(), and getVector3fFromVoxVal().
|
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.
References setVectorReplacement().
Referenced by appendSubImageVoxelsToPointCloud(), setVectorReplacement(), and setVectorReplacement().
|
inline |
Definition at line 55 of file mlPCLMLTools.h.
References setVectorReplacement().
|
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(), ml::MedicalImageProperties::setVoxelToWorldMatrix(), and transformTo().
Referenced by createPointCloudFromPagedImage(), and transformTo().