AxisPropagationBinary3d
Simulates the propagation through a phase of a three-dimensional image and computes a binary image representing the area where the propagation is performed.
Access to parameter description
For an introduction:
A binary output image represents the area where the propagation occurs from the seed to the last slice. A void output image means that the porosity is not connected. The first and last slice are systematically set to 0.
A measurement output object contains information about the propagation indicating if the volume is pierced and distances traveled through the volume.
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:
See also
Access to parameter description
For an introduction:
- section Image Analysis
- section Propagation
A binary output image represents the area where the propagation occurs from the seed to the last slice. A void output image means that the porosity is not connected. The first and last slice are systematically set to 0.
A measurement output object contains information about the propagation indicating if the volume is pierced and distances traveled through the volume.
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.
See also
Function Syntax
This function returns a AxisPropagationBinary3dOutput structure containing the outputBinaryImage and outputMeasurement output parameters.
// Output structure. struct AxisPropagationBinary3dOutput { std::shared_ptr< iolink::ImageView > outputBinaryImage; AxisPropagationBinary3dMsr::Ptr outputMeasurement; }; // Function prototype. AxisPropagationBinary3dOutput axisPropagationBinary3d( std::shared_ptr< iolink::ImageView > inputImage, iolink::Vector2i32 maskAndSeedValues, int32_t maximumThreshold, AxisPropagationBinary3d::Axis axis, std::shared_ptr< iolink::ImageView > outputBinaryImage = NULL, AxisPropagationBinary3dMsr::Ptr outputMeasurement = NULL );
This function returns a tuple containing the output_binary_image and output_measurement output parameters.
// Function prototype. axis_propagation_binary_3d( input_image, mask_and_seed_values = [255, -1024], maximum_threshold = 128, axis = AxisPropagationBinary3d.Axis.Z_AXIS, output_binary_image = None, output_measurement = None )
This function returns a AxisPropagationBinary3dOutput structure containing the outputBinaryImage and outputMeasurement output parameters.
/// Output structure of the AxisPropagationBinary3d function. public struct AxisPropagationBinary3dOutput { public IOLink.ImageView outputBinaryImage; public AxisPropagationBinary3dMsr outputMeasurement; }; // Function prototype. public static AxisPropagationBinary3dOutput AxisPropagationBinary3d( IOLink.ImageView inputImage, int[] maskAndSeedValues = null, Int32 maximumThreshold = 128, AxisPropagationBinary3d.Axis axis = ImageDev.AxisPropagationBinary3d.Axis.Z_AXIS, IOLink.ImageView outputBinaryImage = null, AxisPropagationBinary3dMsr outputMeasurement = null );
Class Syntax
Parameters
Class Name | AxisPropagationBinary3d |
---|
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, then it 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 | ||||||||
outputBinaryImage |
The binary output image representing the propagation within the selected phase. A void image means that there is no connection through the selected axis. Its dimensions are forced to the same values as the input. | Image | nullptr | ||||||||
outputMeasurement |
The output measurement result. | AxisPropagationBinary3dMsr | nullptr |
Object Examples
auto foam_sep = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam_sep.vip" ); AxisPropagationBinary3d axisPropagationBinary3dAlgo; axisPropagationBinary3dAlgo.setInputImage( foam_sep ); axisPropagationBinary3dAlgo.setMaskAndSeedValues( {255, -1024} ); axisPropagationBinary3dAlgo.setMaximumThreshold( 128 ); axisPropagationBinary3dAlgo.setAxis( AxisPropagationBinary3d::Axis::Z_AXIS ); axisPropagationBinary3dAlgo.execute(); std::cout << "outputBinaryImage:" << axisPropagationBinary3dAlgo.outputBinaryImage()->toString(); std::cout << "isVolumePierced: " << axisPropagationBinary3dAlgo.outputMeasurement()->isVolumePierced( ) ;
foam_sep = imagedev.read_vip_image(imagedev_data.get_image_path("foam_sep.vip")) axis_propagation_binary_3d_algo = imagedev.AxisPropagationBinary3d() axis_propagation_binary_3d_algo.input_image = foam_sep axis_propagation_binary_3d_algo.mask_and_seed_values = [255, -1024] axis_propagation_binary_3d_algo.maximum_threshold = 128 axis_propagation_binary_3d_algo.axis = imagedev.AxisPropagationBinary3d.Z_AXIS axis_propagation_binary_3d_algo.execute() print( "output_binary_image:", str( axis_propagation_binary_3d_algo.output_binary_image ) ); print( print("isVolumePierced: ", axis_propagation_binary_3d_algo.output_measurement.is_volume_pierced( ) ) );
ImageView foam_sep = Data.ReadVipImage( @"Data/images/foam_sep.vip" ); AxisPropagationBinary3d axisPropagationBinary3dAlgo = new AxisPropagationBinary3d { inputImage = foam_sep, maskAndSeedValues = new int[]{255, -1024}, maximumThreshold = 128, axis = AxisPropagationBinary3d.Axis.Z_AXIS }; axisPropagationBinary3dAlgo.Execute(); Console.WriteLine( "outputBinaryImage:" + axisPropagationBinary3dAlgo.outputBinaryImage.ToString() ); Console.WriteLine( "isVolumePierced: " + axisPropagationBinary3dAlgo.outputMeasurement.isVolumePierced( ) );
Function Examples
auto foam_sep = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam_sep.vip" ); auto result = axisPropagationBinary3d( foam_sep, {255, -1024}, 128, AxisPropagationBinary3d::Axis::Z_AXIS ); std::cout << "outputBinaryImage:" << result.outputBinaryImage->toString(); std::cout << "isVolumePierced: " << result.outputMeasurement->isVolumePierced( ) ;
foam_sep = imagedev.read_vip_image(imagedev_data.get_image_path("foam_sep.vip")) result_output_binary_image, result_output_measurement = imagedev.axis_propagation_binary_3d( foam_sep, [255, -1024], 128, imagedev.AxisPropagationBinary3d.Z_AXIS ) print( "output_binary_image:", str( result_output_binary_image ) ); print( "isVolumePierced: ", result_output_measurement.is_volume_pierced( ) );
ImageView foam_sep = Data.ReadVipImage( @"Data/images/foam_sep.vip" ); Processing.AxisPropagationBinary3dOutput result = Processing.AxisPropagationBinary3d( foam_sep, new int[]{255, -1024}, 128, AxisPropagationBinary3d.Axis.Z_AXIS ); Console.WriteLine( "outputBinaryImage:" + result.outputBinaryImage.ToString() ); Console.WriteLine( "isVolumePierced: " + result.outputMeasurement.isVolumePierced( ) );