PorosityPercentage3d
Measures the enclosed porosity percentage inside a volume of interest of a three-dimensional binary image, slice by slice, along the Z axis.
Access to parameter description
For an introduction:
This algorithm computes the mean two-dimensional porosity $Po$ over the XY slices of the binary input volume as follows:
$$ Po=\frac{100}{Z}\sum_{z=0}^{Z-1} \frac{Ar(F_z)-Ar(I_z)}{Ar(F_z)} $$ where
See also
Access to parameter description
For an introduction:
- section Image Analysis
- section Morphometry
This algorithm computes the mean two-dimensional porosity $Po$ over the XY slices of the binary input volume as follows:
$$ Po=\frac{100}{Z}\sum_{z=0}^{Z-1} \frac{Ar(F_z)-Ar(I_z)}{Ar(F_z)} $$ where
- $Ar$ is the 2D area measurement.
- $I_z$ denotes a XY slice of the binary input volume $I$.
- $F_z$ the same slice with all its holes filled by the FillHoles2d algorithm.
- $Z$ denotes the number of XY slices of $I$.
See also
Function Syntax
This function returns outputMeasurement.
// Function prototype
PorosityPercentageMsr::Ptr porosityPercentage3d( std::shared_ptr< iolink::ImageView > inputBinaryImage, std::shared_ptr< iolink::ImageView > inputMaskImage, PorosityPercentageMsr::Ptr outputMeasurement = NULL );
This function returns outputMeasurement.
// Function prototype. porosity_percentage_3d( input_binary_image, input_mask_image, output_measurement = None )
This function returns outputMeasurement.
// Function prototype. public static PorosityPercentageMsr PorosityPercentage3d( IOLink.ImageView inputBinaryImage, IOLink.ImageView inputMaskImage, PorosityPercentageMsr outputMeasurement = null );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
inputBinaryImage |
The 3D binary input image. | Image | Binary | nullptr | |
inputMaskImage |
The binary image defining the volume of interest. The measurement is computed from voxels having a value of 1 in this image. If it equals null, the computation is performed from all voxels of the input image. It must have same dimensions as the input image. | Image | Binary | nullptr | |
outputMeasurement |
The output measurement result. | PorosityPercentageMsr | nullptr |
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
input_binary_image |
The 3D binary input image. | image | Binary | None | |
input_mask_image |
The binary image defining the volume of interest. The measurement is computed from voxels having a value of 1 in this image. If it equals null, the computation is performed from all voxels of the input image. It must have same dimensions as the input image. | image | Binary | None | |
output_measurement |
The output measurement result. | PorosityPercentageMsr | None |
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
inputBinaryImage |
The 3D binary input image. | Image | Binary | null | |
inputMaskImage |
The binary image defining the volume of interest. The measurement is computed from voxels having a value of 1 in this image. If it equals null, the computation is performed from all voxels of the input image. It must have same dimensions as the input image. | Image | Binary | null | |
outputMeasurement |
The output measurement result. | PorosityPercentageMsr | null |
Object Examples
auto foam_sep = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam_sep.vip" ); PorosityPercentage3d porosityPercentage3dAlgo; porosityPercentage3dAlgo.setInputBinaryImage( foam_sep ); porosityPercentage3dAlgo.setInputMaskImage( foam_sep ); porosityPercentage3dAlgo.execute(); std::cout << "percentage: " << porosityPercentage3dAlgo.outputMeasurement()->percentage( ) ;
foam_sep = imagedev.read_vip_image(imagedev_data.get_image_path("foam_sep.vip")) porosity_percentage_3d_algo = imagedev.PorosityPercentage3d() porosity_percentage_3d_algo.input_binary_image = foam_sep porosity_percentage_3d_algo.input_mask_image = foam_sep porosity_percentage_3d_algo.execute() print( "percentage: ", str( porosity_percentage_3d_algo.output_measurement.percentage( ) ) )
ImageView foam_sep = Data.ReadVipImage( @"Data/images/foam_sep.vip" ); PorosityPercentage3d porosityPercentage3dAlgo = new PorosityPercentage3d { inputBinaryImage = foam_sep, inputMaskImage = foam_sep }; porosityPercentage3dAlgo.Execute(); Console.WriteLine( "percentage: " + porosityPercentage3dAlgo.outputMeasurement.percentage( ) );
Function Examples
auto foam_sep = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam_sep.vip" ); auto result = porosityPercentage3d( foam_sep, foam_sep ); std::cout << "percentage: " << result->percentage( ) ;
foam_sep = imagedev.read_vip_image(imagedev_data.get_image_path("foam_sep.vip")) result = imagedev.porosity_percentage_3d( foam_sep, foam_sep ) print( "percentage: ", str( result.percentage( ) ) )
ImageView foam_sep = Data.ReadVipImage( @"Data/images/foam_sep.vip" ); PorosityPercentageMsr result = Processing.PorosityPercentage3d( foam_sep, foam_sep ); Console.WriteLine( "percentage: " + result.percentage( ) );