PCLMLImageToPointCloud

MLModule
genre PCLMLAdapters
author Wolf Spindler
package FMEstable/PCL
dll MLPCLMLAdapters
definition MLPCLMLAdapters.def
see also PCLBaseListToPointCloud, PCLVoxelGrid
inherits from PCLModule
keywords points, clouds, PCL, image, convert

Purpose

PCLMLImageToPointCloud converts an ML image to a point cloud from the Point Cloud Library (PCL) by taking all image voxels and storing them as points in a point cloud data structure. With thresholds the amount of converted voxels can be controlled, and the type of the created point cloud can be selected from all supported ones. In the conversion process the [x,y,z] coordinate of voxels are converted to the points.data.x, .y, and .z members (also named points.data[0], [1] and [2]). The voxel value is, if the created point cloud provides such members, stored in the intensity replacement member of points which differs between point cloud types. Before storing it it is possibly modified dependent on Normalize In Clamped Range. For example in PointXYZ point clouds there is no point member which could store the intensity, therefore only the coordinates are stored, in PointXYZLNormal and PointXYZRGBNormal point clouds the curvature member in points is used for storing it, in PointXYZINormal it is the intensity member.

See PCLVoxelGrid for a module doing the inverse operation, the sampling of a point cloud to an ML image.

This module still does not set up any indices in the output base object, which, however, may be added in the future.

Windows

Default Panel

../../../Projects/MLPCLMLAdapters/Modules/mhelp/Images/Screenshots/PCLMLImageToPointCloud._default.png

Input Fields

input0

name: input0, type: Image

Here the input image must be connected from which the voxels for the point cloud shall be extracted.

Output Fields

outputPCLObject0

name: outputPCLObject0, type: MLBase

The connector where the created point cloud is provided to other modules. This module still does not set up any indices in the output base object, which, however, may be added in the future.

Parameter Fields

Visible Fields

Status

name: status, type: String, persistent: no

see PCLModule.status

Output Point Cloud Type

name: outputPointCloudType, type: Enum, default: ML_PCL_POINT_XYZ

Output Point Cloud Type is a selector for the desired type of the created point cloud. All supported types in the MeVisLab PCL binding are shown.

Values:

Title Name
Xyz ML_PCL_POINT_XYZ
Xyzlnormal ML_PCL_POINT_XYZLNORMAL
Xyzrgbnormal ML_PCL_POINT_XYZRGBNORMAL
Xyzinormal ML_PCL_POINT_XYZINORMAL

Threshold Min

name: thresholdMin, type: Double, default: 1

If any value is smaller than Threshold Min and Skip Voxels Below Min is true then the voxel is not added to the point cloud; if any value is smaller than Threshold Min and Skip Voxels Below Min is false then the voxel is set to Lower Value and added to the point cloud.

Threshold Max

name: thresholdMax, type: Double, default: 4095

If any value is larger than Threshold Max and Skip Voxels Above Max is true then the voxel is not added to the point cloud; if any value is larger than Threshold Max and Skip Voxels Above Max is false then the voxel is set to Upper Value and added to the point cloud.

Lower Value

name: lowerValue, type: Double, default: 1

Possibly used as replacement value for voxels smaller than Threshold Min; see Threshold Min for details.

Upper Value

name: upperValue, type: Double, default: 4095

Possibly used used as replacement value for voxels larger than Threshold Max; see Threshold Max for details.

Skip Voxels Below Min

name: skipVoxelsBelowMin, type: Bool, default: TRUE

Used when voxels are smaller than Threshold Min; see Threshold Min for details.

Skip Voxels Above Max

name: skipVoxelsAboveMax, type: Bool, default: TRUE

Used when voxels are larger than Threshold Max; see Threshold Max for details.

Normalize In Clamped Range

name: normalizeInClampedRange, type: Bool, default: FALSE

If enabled then all voxel values are scaled from [Lower Value, Upper Value] to [0,1] before they are stored in the point cloud; if necessary then they will be clamped to [Lower Value, Upper Value] before scaling. If disabled then all voxel values are taken as described by other fields. This settings is especially useful if the voxel value shall be used as grey value intensity later.

Use Vector Length As Intensity

name: useVectorLengthAsIntensity, type: Bool, default: FALSE

If enabled then the length of a possibly existing normal vector is used instead of the incoming voxel intensity; all other functionality is done as if it is a voxel value. If disabled then the voxel value is normally cast to double.

Transform To World

name: transformToWorld, type: Bool, default: FALSE

If enabled then all point coordinates retrieved from voxel coordinates are translated world coordinates using the PagedImage.mapVoxelToWorld() method, otherwise the coordinates are used as they are.