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 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:
        
See also
		Access to parameter description
For an introduction:
- section Image Analysis
 - section Morphometry
 
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:
- Area $Ar$ and perimeter $P$ for a 2D image
 - Volume $V$ and surface $S$ for a 3D image
 
- In 2D, it defined as: $$ FI = \frac{P_d-P}{Ar_d-Ar} $$
 - In 3D, it defined as: $$ FI = \frac{S_d-S}{V_d-V} $$
 
- $P$ and $Ar$ are respectively the object perimeter and area.
 - $S$ and $V$ are respectively the object surface and volume.
 - The subscript $d$ means 'after dilation'.
 
See also
Function Syntax
This function returns the outputMeasurement output parameter.
                        
                    
// Function prototype.
FragmentationMsr::Ptr
fragmentationIndex( std::shared_ptr< iolink::ImageView > inputBinaryImage,
                    int32_t kernelRadius,
                    FragmentationMsr::Ptr outputMeasurement = NULL );
                    
This function returns the outputMeasurement output parameter.
                        
                    // Function prototype. fragmentation_index( input_binary_image, kernel_radius = 3, output_measurement = None )
This function returns the outputMeasurement output parameter.
                        
                
// Function prototype.
public static FragmentationMsr
FragmentationIndex( IOLink.ImageView inputBinaryImage,
                    Int32 kernelRadius = 3,
                    FragmentationMsr outputMeasurement = null );
                    Class Syntax
Parameters
| Class Name | FragmentationIndex | 
|---|
| Parameter Name | Description | Type | Supported Values | Default Value | |
|---|---|---|---|---|---|
![]()  | 
  inputBinaryImage    | 
 The binary input image. | Image | Binary | nullptr | 
![]()  | 
  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 | 
![]()  | 
  outputMeasurement    | 
 The output measurement result. | FragmentationMsr | nullptr | |
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( 
print("index: ", 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: ", 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 ) );

