EuclideanDistanceMap3d
Computes the Euclidean distance map of objects in a three-dimensional binary image.
Access to parameter description
This algorithm computes a 3D distance map for a 3D object. Each voxel is assigned a value depending on the distance to the nearest object boundary.
The boundary voxels of the object are assigned a value of zero whereas the assigned value increases as the distance increases. This algorithm computes distances using the Euclidean metric.
Note: This algorithm takes into account the input image calibration. The output values are indicating distance in world units, as defined by the calibration.
See also
Access to parameter description
This algorithm computes a 3D distance map for a 3D object. Each voxel is assigned a value depending on the distance to the nearest object boundary.
The boundary voxels of the object are assigned a value of zero whereas the assigned value increases as the distance increases. This algorithm computes distances using the Euclidean metric.
Note: This algorithm takes into account the input image calibration. The output values are indicating distance in world units, as defined by the calibration.
See also
Function Syntax
This function returns outputMapImage.
// Function prototype
std::shared_ptr< iolink::ImageView > euclideanDistanceMap3d( std::shared_ptr< iolink::ImageView > inputBinaryImage, EuclideanDistanceMap3d::MappingMode mappingMode, EuclideanDistanceMap3d::BorderCondition borderCondition, std::shared_ptr< iolink::ImageView > outputMapImage = NULL );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |||||
---|---|---|---|---|---|---|---|---|---|
![]() |
inputBinaryImage |
The binary input image. | Image | Binary | nullptr | ||||
![]() |
mappingMode |
The mode defining where the distance field is computed.
|
Enumeration | INSIDE | |||||
![]() |
borderCondition |
The mode defining the border conditions.
|
Enumeration | ZERO | |||||
![]() |
outputMapImage |
The distance map output image. Distance map of the shape represented by the input image. Each voxel is assigned to a value depending on the distance to the nearest object boundary. Its dimensions are forced to the same values as the input. Its data type is 32-bit floating point. | Image | nullptr |
Object Examples
auto foam_sep = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam_sep.vip" ); EuclideanDistanceMap3d euclideanDistanceMap3dAlgo; euclideanDistanceMap3dAlgo.setInputBinaryImage( foam_sep ); euclideanDistanceMap3dAlgo.setMappingMode( EuclideanDistanceMap3d::MappingMode::INSIDE ); euclideanDistanceMap3dAlgo.setBorderCondition( EuclideanDistanceMap3d::BorderCondition::ZERO ); euclideanDistanceMap3dAlgo.execute(); std::cout << "outputMapImage:" << euclideanDistanceMap3dAlgo.outputMapImage()->toString();
Function Examples
auto foam_sep = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam_sep.vip" ); auto result = euclideanDistanceMap3d( foam_sep, EuclideanDistanceMap3d::MappingMode::INSIDE, EuclideanDistanceMap3d::BorderCondition::ZERO ); std::cout << "outputMapImage:" << result->toString();