ImageDev

FragmentationIndex

Computes an index of relative convexity or concavity of the surface of objects from a binary image.

Access to parameter description

For an introduction: This algorithm computes an indicator of connectivity. It calculates an index of relative convexity or concavity of the surface.
This index can be interpreted in mater of connectivity taken into account that concavity indicates connectivity, and that convexity indicates isolated disconnected structures.

The fragmentation index is calculated by comparing: The fragmentation $FI$ is computed on a binarized image before and after an image dilation. where Dilation of an highly connected area narrows spaces and then produces a smaller perimeter. On the other hand, it expands the perimeter of open ends or nodes. Consequently, a low fragmentation index signifies better connected area while a high fragmentation index means a more disconnected structure. In some cases, a high ratio of enclosed cavities and concave surfaces can result in a negative fragmentation index.

See also

Function Syntax

This function returns outputMeasurement.
// Function prototype
FragmentationMsr::Ptr fragmentationIndex( std::shared_ptr< iolink::ImageView > inputBinaryImage, int32_t kernelRadius, FragmentationMsr::Ptr outputMeasurement = nullptr );
This function returns outputMeasurement.
// Function prototype.
fragmentation_index(input_binary_image: idt.ImageType,
                    kernel_radius: int = 3,
                    output_measurement: Union[Any, None] = None) -> FragmentationMsr
This function returns outputMeasurement.
// Function prototype.
public static FragmentationMsr
FragmentationIndex( IOLink.ImageView inputBinaryImage,
                    Int32 kernelRadius = 3,
                    FragmentationMsr outputMeasurement = null );

Class Syntax

Parameters

Parameter Name Description Type Supported Values Default Value
input
inputBinaryImage
The binary input image. Image Binary nullptr
input
kernelRadius
The number of iterations of the dilation (that is, the half side size of the cubic structuring element in voxels). A cube structuring element always has an odd side length (3x3x3, 5x5x5, etc.) which is defined by twice the kernel radius + 1. Int32 >=1 3
output
outputMeasurement
The output measurement result. FragmentationMsr nullptr
Parameter Name Description Type Supported Values Default Value
input
input_binary_image
The binary input image. image Binary None
input
kernel_radius
The number of iterations of the dilation (that is, the half side size of the cubic structuring element in voxels). A cube structuring element always has an odd side length (3x3x3, 5x5x5, etc.) which is defined by twice the kernel radius + 1. int32 >=1 3
output
output_measurement
The output measurement result. FragmentationMsr None
Parameter Name Description Type Supported Values Default Value
input
inputBinaryImage
The binary input image. Image Binary null
input
kernelRadius
The number of iterations of the dilation (that is, the half side size of the cubic structuring element in voxels). A cube structuring element always has an odd side length (3x3x3, 5x5x5, etc.) which is defined by twice the kernel radius + 1. Int32 >=1 3
output
outputMeasurement
The output measurement result. FragmentationMsr null

Object Examples

auto polystyrene_sep = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene_sep.vip" );

FragmentationIndex fragmentationIndexAlgo;
fragmentationIndexAlgo.setInputBinaryImage( polystyrene_sep );
fragmentationIndexAlgo.setKernelRadius( 3 );
fragmentationIndexAlgo.execute();

std::cout << "index: " << fragmentationIndexAlgo.outputMeasurement()->index( 0 ) ;
polystyrene_sep = imagedev.read_vip_image(imagedev_data.get_image_path("polystyrene_sep.vip"))

fragmentation_index_algo = imagedev.FragmentationIndex()
fragmentation_index_algo.input_binary_image = polystyrene_sep
fragmentation_index_algo.kernel_radius = 3
fragmentation_index_algo.execute()

print("index: ", str(fragmentation_index_algo.output_measurement.index(0)))
ImageView polystyrene_sep = Data.ReadVipImage( @"Data/images/polystyrene_sep.vip" );

FragmentationIndex fragmentationIndexAlgo = new FragmentationIndex
{
    inputBinaryImage = polystyrene_sep,
    kernelRadius = 3
};
fragmentationIndexAlgo.Execute();

Console.WriteLine( "index: " + fragmentationIndexAlgo.outputMeasurement.index( 0 ) );

Function Examples

auto polystyrene_sep = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene_sep.vip" );

auto result = fragmentationIndex( polystyrene_sep, 3 );

std::cout << "index: " << result->index( 0 ) ;
polystyrene_sep = imagedev.read_vip_image(imagedev_data.get_image_path("polystyrene_sep.vip"))

result = imagedev.fragmentation_index(polystyrene_sep, 3)

print("index: ", str(result.index(0)))
ImageView polystyrene_sep = Data.ReadVipImage( @"Data/images/polystyrene_sep.vip" );

FragmentationMsr result = Processing.FragmentationIndex( polystyrene_sep, 3 );

Console.WriteLine(  "index: " + result.index( 0 )  );