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 );
This function returns outputMapImage.
// Function prototype. euclidean_distance_map_3d( input_binary_image, mapping_mode = EuclideanDistanceMap3d.MappingMode.INSIDE, border_condition = EuclideanDistanceMap3d.BorderCondition.ZERO, output_map_image = None )
This function returns outputMapImage.
// Function prototype. public static IOLink.ImageView EuclideanDistanceMap3d( IOLink.ImageView inputBinaryImage, EuclideanDistanceMap3d.MappingMode mappingMode = ImageDev.EuclideanDistanceMap3d.MappingMode.INSIDE, EuclideanDistanceMap3d.BorderCondition borderCondition = ImageDev.EuclideanDistanceMap3d.BorderCondition.ZERO, 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 |
Parameter Name | Description | Type | Supported Values | Default Value | |||||
---|---|---|---|---|---|---|---|---|---|
input_binary_image |
The binary input image. | image | Binary | None | |||||
mapping_mode |
The mode defining where the distance field is computed.
|
enumeration | INSIDE | ||||||
border_condition |
The mode defining the border conditions.
|
enumeration | ZERO | ||||||
output_map_image |
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 | None |
Parameter Name | Description | Type | Supported Values | Default Value | |||||
---|---|---|---|---|---|---|---|---|---|
inputBinaryImage |
The binary input image. | Image | Binary | null | |||||
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 | null |
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();
foam_sep = imagedev.read_vip_image(imagedev_data.get_image_path("foam_sep.vip")) euclidean_distance_map_3d_algo = imagedev.EuclideanDistanceMap3d() euclidean_distance_map_3d_algo.input_binary_image = foam_sep euclidean_distance_map_3d_algo.mapping_mode = imagedev.EuclideanDistanceMap3d.INSIDE euclidean_distance_map_3d_algo.border_condition = imagedev.EuclideanDistanceMap3d.ZERO euclidean_distance_map_3d_algo.execute() print( "output_map_image:", str( euclidean_distance_map_3d_algo.output_map_image ) )
ImageView foam_sep = Data.ReadVipImage( @"Data/images/foam_sep.vip" ); EuclideanDistanceMap3d euclideanDistanceMap3dAlgo = new EuclideanDistanceMap3d { inputBinaryImage = foam_sep, mappingMode = EuclideanDistanceMap3d.MappingMode.INSIDE, borderCondition = EuclideanDistanceMap3d.BorderCondition.ZERO }; euclideanDistanceMap3dAlgo.Execute(); Console.WriteLine( "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();
foam_sep = imagedev.read_vip_image(imagedev_data.get_image_path("foam_sep.vip")) result = imagedev.euclidean_distance_map_3d( foam_sep, imagedev.EuclideanDistanceMap3d.INSIDE, imagedev.EuclideanDistanceMap3d.ZERO ) print( "output_map_image:", str( result ) )
ImageView foam_sep = Data.ReadVipImage( @"Data/images/foam_sep.vip" ); IOLink.ImageView result = Processing.EuclideanDistanceMap3d( foam_sep, EuclideanDistanceMap3d.MappingMode.INSIDE, EuclideanDistanceMap3d.BorderCondition.ZERO ); Console.WriteLine( "outputMapImage:" + result.ToString() );