AxisPropagationDistance3d
Simulates the propagation through a phase of a three-dimensional image and computes an image of traveled distances.
Access to parameter description
For an introduction:
The maskAndSeedValues and maximumThreshold parameters identify areas of the image in which propagation can be done; therefore, it allows identifying non-porous areas.
Propagation is performed from the seeds, along the user defined axis, through voxels of intensity X verifying the following four conditions:
Figure 1. Input CT core sample image (left) and propagation distance image (right)
In the binary case, the maskAndSeedValues and maximumThreshold are ignored. The propagation does not reject any specific value, propagates through 0 intensity values and stops on 1 intensity values. It amounts to considering maskAndSeedValues at [2, 0] and maximumThreshold at 0.
See also
Access to parameter description
For an introduction:
- section Image Analysis
- section Propagation
The maskAndSeedValues and maximumThreshold parameters identify areas of the image in which propagation can be done; therefore, it allows identifying non-porous areas.
Propagation is performed from the seeds, along the user defined axis, through voxels of intensity X verifying the following four conditions:
- The voxel is connected (adjacent) to a voxel already 'propagated'.
- X is different from the first maskAndSeedValues value.
- X is greater or equal to the second maskAndSeedValues value.
- X is smaller or equal to the maximumThreshold value.
|
|
In the binary case, the maskAndSeedValues and maximumThreshold are ignored. The propagation does not reject any specific value, propagates through 0 intensity values and stops on 1 intensity values. It amounts to considering maskAndSeedValues at [2, 0] and maximumThreshold at 0.
See also
Function Syntax
This function returns a AxisPropagationDistance3dOutput structure containing the outputImage and outputMeasurement output parameters.
// Output structure. struct AxisPropagationDistance3dOutput { std::shared_ptr< iolink::ImageView > outputImage; AxisPropagationDistance3dMsr::Ptr outputMeasurement; }; // Function prototype. AxisPropagationDistance3dOutput axisPropagationDistance3d( std::shared_ptr< iolink::ImageView > inputImage, iolink::Vector2i32 maskAndSeedValues, int32_t maximumThreshold, AxisPropagationDistance3d::Axis axis, AxisPropagationDistance3d::PropagationDirection propagationDirection, std::shared_ptr< iolink::ImageView > outputImage = NULL, AxisPropagationDistance3dMsr::Ptr outputMeasurement = NULL );
This function returns a tuple containing the output_image and output_measurement output parameters.
// Function prototype. axis_propagation_distance_3d( input_image, mask_and_seed_values = [255, -1024], maximum_threshold = 128, axis = AxisPropagationDistance3d.Axis.Z_AXIS, propagation_direction = AxisPropagationDistance3d.PropagationDirection.MIN_TO_MAX, output_image = None, output_measurement = None )
This function returns a AxisPropagationDistance3dOutput structure containing the outputImage and outputMeasurement output parameters.
/// Output structure of the AxisPropagationDistance3d function. public struct AxisPropagationDistance3dOutput { public IOLink.ImageView outputImage; public AxisPropagationDistance3dMsr outputMeasurement; }; // Function prototype. public static AxisPropagationDistance3dOutput AxisPropagationDistance3d( IOLink.ImageView inputImage, int[] maskAndSeedValues = null, Int32 maximumThreshold = 128, AxisPropagationDistance3d.Axis axis = ImageDev.AxisPropagationDistance3d.Axis.Z_AXIS, AxisPropagationDistance3d.PropagationDirection propagationDirection = ImageDev.AxisPropagationDistance3d.PropagationDirection.MIN_TO_MAX, IOLink.ImageView outputImage = null, AxisPropagationDistance3dMsr outputMeasurement = null );
Class Syntax
Parameters
Class Name | AxisPropagationDistance3d |
---|
Parameter Name | Description | Type | Supported Values | Default Value | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
inputImage |
The input grayscale, binary, or color image. In the case of a binary image, the background represents the phase where the propagation has to be performed. | Image | Binary, Label or Grayscale | nullptr | |||||||
maskAndSeedValues |
The first value is a mask value. Voxels with this intensity value are not infiltrated by the propagation. The second value is the seed value. Voxels with an intensity value lower than this seed value are not infiltrated by the propagation. A value lower than the second value of maskAndSeedValues or greater or equal to maximumThreshold is ignored. This parameter is ignored in binary case, and then is forced to [2, 0]. | Vector2i32 | Any value | {255, -1024} | |||||||
maximumThreshold |
The maximum propagation intensity value. Voxels having an intensity value greater or equal to this value are rejected by the propagation. This parameter is ignored in binary case, and is forced to 1. | Int32 | Any value | 128 | |||||||
axis |
The axis along which the propagation is performed.
|
Enumeration | Z_AXIS | ||||||||
propagationDirection |
The direction in which the propagation is performed.
|
Enumeration | MIN_TO_MAX | ||||||||
outputImage |
The grayscale output image where each voxel intensity value represents the propagation distance from the seeds. This distance is expressed in voxels; it is not calibrated. Its dimensions and type are forced to the same values as the input. | Image | nullptr | ||||||||
outputMeasurement |
The output measurement result. | AxisPropagationDistance3dMsr | nullptr |
Object Examples
auto foam_sep = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam_sep.vip" ); AxisPropagationDistance3d axisPropagationDistance3dAlgo; axisPropagationDistance3dAlgo.setInputImage( foam_sep ); axisPropagationDistance3dAlgo.setMaskAndSeedValues( {255, -1024} ); axisPropagationDistance3dAlgo.setMaximumThreshold( 128 ); axisPropagationDistance3dAlgo.setAxis( AxisPropagationDistance3d::Axis::X_AXIS ); axisPropagationDistance3dAlgo.setPropagationDirection( AxisPropagationDistance3d::PropagationDirection::MIN_TO_MAX ); axisPropagationDistance3dAlgo.execute(); std::cout << "outputImage:" << axisPropagationDistance3dAlgo.outputImage()->toString(); std::cout << "isVolumePierced: " << axisPropagationDistance3dAlgo.outputMeasurement()->isVolumePierced( ) ;
foam_sep = imagedev.read_vip_image(imagedev_data.get_image_path("foam_sep.vip")) axis_propagation_distance_3d_algo = imagedev.AxisPropagationDistance3d() axis_propagation_distance_3d_algo.input_image = foam_sep axis_propagation_distance_3d_algo.mask_and_seed_values = [255, -1024] axis_propagation_distance_3d_algo.maximum_threshold = 128 axis_propagation_distance_3d_algo.axis = imagedev.AxisPropagationDistance3d.X_AXIS axis_propagation_distance_3d_algo.propagation_direction = imagedev.AxisPropagationDistance3d.MIN_TO_MAX axis_propagation_distance_3d_algo.execute() print( "output_image:", str( axis_propagation_distance_3d_algo.output_image ) ) print( "isVolumePierced: ", str( axis_propagation_distance_3d_algo.output_measurement.is_volume_pierced( ) ) )
ImageView foam_sep = Data.ReadVipImage( @"Data/images/foam_sep.vip" ); AxisPropagationDistance3d axisPropagationDistance3dAlgo = new AxisPropagationDistance3d { inputImage = foam_sep, maskAndSeedValues = new int[]{255, -1024}, maximumThreshold = 128, axis = AxisPropagationDistance3d.Axis.X_AXIS, propagationDirection = AxisPropagationDistance3d.PropagationDirection.MIN_TO_MAX }; axisPropagationDistance3dAlgo.Execute(); Console.WriteLine( "outputImage:" + axisPropagationDistance3dAlgo.outputImage.ToString() ); Console.WriteLine( "isVolumePierced: " + axisPropagationDistance3dAlgo.outputMeasurement.isVolumePierced( ) );
Function Examples
auto foam_sep = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam_sep.vip" ); auto result = axisPropagationDistance3d( foam_sep, {255, -1024}, 128, AxisPropagationDistance3d::Axis::X_AXIS, AxisPropagationDistance3d::PropagationDirection::MIN_TO_MAX ); std::cout << "outputImage:" << result.outputImage->toString(); std::cout << "isVolumePierced: " << result.outputMeasurement->isVolumePierced( ) ;
foam_sep = imagedev.read_vip_image(imagedev_data.get_image_path("foam_sep.vip")) result_output_image, result_output_measurement = imagedev.axis_propagation_distance_3d( foam_sep, [255, -1024], 128, imagedev.AxisPropagationDistance3d.X_AXIS, imagedev.AxisPropagationDistance3d.MIN_TO_MAX ) print( "output_image:", str( result_output_image ) ) print( "isVolumePierced: ", str( result_output_measurement.is_volume_pierced( ) ) )
ImageView foam_sep = Data.ReadVipImage( @"Data/images/foam_sep.vip" ); Processing.AxisPropagationDistance3dOutput result = Processing.AxisPropagationDistance3d( foam_sep, new int[]{255, -1024}, 128, AxisPropagationDistance3d.Axis.X_AXIS, AxisPropagationDistance3d.PropagationDirection.MIN_TO_MAX ); Console.WriteLine( "outputImage:" + result.outputImage.ToString() ); Console.WriteLine( "isVolumePierced: " + result.outputMeasurement.isVolumePierced( ) );