VolumeFractionByRegion
Computes, for each region of a first label image, the intersection ratio with particles of a second label image.
Access to parameter description
This algorithm computes the intersection ratio of a particle in a given region.
IR(P,R)=A(R∩P)A(P)
Where IR is the intersection ratio, A the number of pixels (area in the 2D case, volume in 3D), R a given region and P a given particle.
For example, it can be used in digital rock analysis by setting a ganglia segmentation as region input (object image) and a pore segmentation as particle input (label image). If the ganglia segmentation is oil and water, one can get the percentage of oil and water per pore.
Result is a two-dimensional array where the first index refers to particles and the second index to regions. For regions, index 0 refers to the background (pixels having an intensity equal to 0). For particles, index 0 refers to the first label (pixels having an intensity equal to 1).
See also
Access to parameter description
This algorithm computes the intersection ratio of a particle in a given region.
IR(P,R)=A(R∩P)A(P)
Where IR is the intersection ratio, A the number of pixels (area in the 2D case, volume in 3D), R a given region and P a given particle.
For example, it can be used in digital rock analysis by setting a ganglia segmentation as region input (object image) and a pore segmentation as particle input (label image). If the ganglia segmentation is oil and water, one can get the percentage of oil and water per pore.
Result is a two-dimensional array where the first index refers to particles and the second index to regions. For regions, index 0 refers to the background (pixels having an intensity equal to 0). For particles, index 0 refers to the first label (pixels having an intensity equal to 1).
See also
Function Syntax
This function returns outputMeasurement.
// Function prototype
VolumeFractionByRegionMsr::Ptr volumeFractionByRegion( std::shared_ptr< iolink::ImageView > inputObjectImage, std::shared_ptr< iolink::ImageView > inputLabelImage, VolumeFractionByRegionMsr::Ptr outputMeasurement = NULL );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
![]() |
inputObjectImage |
The input binary or label image representing the regions to be analyzed. | Image | Binary or Label | nullptr |
![]() |
inputLabelImage |
The input label image containing the particles to be intersected with regions. This image must have same dimensions as the region input image. | Image | Label | nullptr |
![]() |
outputMeasurement |
The output measurement result providing the intersection ratio between each region and particle. | VolumeFractionByRegionMsr | nullptr |
Object Examples
auto polystyrene_sep_label = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene_sep_label.vip" ); VolumeFractionByRegion volumeFractionByRegionAlgo; volumeFractionByRegionAlgo.setInputObjectImage( polystyrene_sep_label ); volumeFractionByRegionAlgo.setInputLabelImage( polystyrene_sep_label ); volumeFractionByRegionAlgo.execute(); std::cout << "intersectionRatio: " << volumeFractionByRegionAlgo.outputMeasurement()->intersectionRatio( 0 , 0 ) ;
Function Examples
auto polystyrene_sep_label = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene_sep_label.vip" ); auto result = volumeFractionByRegion( polystyrene_sep_label, polystyrene_sep_label ); std::cout << "intersectionRatio: " << result->intersectionRatio( 0 , 0 ) ;