ImageDev

AverageObjectAreaPerSlice3d

Computes the average objects area along XY slices inside the volume of interest of a three-dimensional binary image.

Access to parameter description

For an introduction: This algorithm can be used in association with the AverageObjectCountPerSlice3d algorithm as an indicator of connectivity since great number of small objects along image slices may result in high fragmentation ratio. On the other hand, a small number of objects with large area along image slices may lead to high connectivity.

See also

Function Syntax

This function returns outputMeasurement.
// Function prototype
AverageObjectAreaPerSliceMsr::Ptr averageObjectAreaPerSlice3d( std::shared_ptr< iolink::ImageView > inputObjectImage, std::shared_ptr< iolink::ImageView > inputMaskImage, AverageObjectAreaPerSliceMsr::Ptr outputMeasurement = nullptr );
This function returns outputMeasurement.
// Function prototype.
average_object_area_per_slice_3d(input_object_image: idt.ImageType,
                                 input_mask_image: idt.ImageType,
                                 output_measurement: Union[Any, None] = None) -> AverageObjectAreaPerSliceMsr
This function returns outputMeasurement.
// Function prototype.
public static AverageObjectAreaPerSliceMsr
AverageObjectAreaPerSlice3d( IOLink.ImageView inputObjectImage,
                             IOLink.ImageView inputMaskImage,
                             AverageObjectAreaPerSliceMsr outputMeasurement = null );

Class Syntax

Parameters

Parameter Name Description Type Supported Values Default Value
input
inputObjectImage
The 3D binary input image. Image Binary nullptr
input
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
output
outputMeasurement
The output measurement result. AverageObjectAreaPerSliceMsr nullptr
Parameter Name Description Type Supported Values Default Value
input
input_object_image
The 3D binary input image. image Binary None
input
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
output_measurement
The output measurement result. AverageObjectAreaPerSliceMsr None
Parameter Name Description Type Supported Values Default Value
input
inputObjectImage
The 3D binary input image. Image Binary null
input
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
output
outputMeasurement
The output measurement result. AverageObjectAreaPerSliceMsr null

Object Examples

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

AverageObjectAreaPerSlice3d averageObjectAreaPerSlice3dAlgo;
averageObjectAreaPerSlice3dAlgo.setInputObjectImage( foam_sep );
averageObjectAreaPerSlice3dAlgo.setInputMaskImage( foam_sep );
averageObjectAreaPerSlice3dAlgo.execute();

std::cout << "pixelCount: " << averageObjectAreaPerSlice3dAlgo.outputMeasurement()->pixelCount( ) ;
foam_sep = imagedev.read_vip_image(imagedev_data.get_image_path("foam_sep.vip"))

average_object_area_per_slice_3d_algo = imagedev.AverageObjectAreaPerSlice3d()
average_object_area_per_slice_3d_algo.input_object_image = foam_sep
average_object_area_per_slice_3d_algo.input_mask_image = foam_sep
average_object_area_per_slice_3d_algo.execute()

print("pixelCount: ", str(average_object_area_per_slice_3d_algo.output_measurement.pixel_count()))
ImageView foam_sep = Data.ReadVipImage( @"Data/images/foam_sep.vip" );

AverageObjectAreaPerSlice3d averageObjectAreaPerSlice3dAlgo = new AverageObjectAreaPerSlice3d
{
    inputObjectImage = foam_sep,
    inputMaskImage = foam_sep
};
averageObjectAreaPerSlice3dAlgo.Execute();

Console.WriteLine( "pixelCount: " + averageObjectAreaPerSlice3dAlgo.outputMeasurement.pixelCount( ) );

Function Examples

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

auto result = averageObjectAreaPerSlice3d( foam_sep, foam_sep );

std::cout << "pixelCount: " << result->pixelCount( ) ;
foam_sep = imagedev.read_vip_image(imagedev_data.get_image_path("foam_sep.vip"))

result = imagedev.average_object_area_per_slice_3d(foam_sep, foam_sep)

print("pixelCount: ", str(result.pixel_count()))
ImageView foam_sep = Data.ReadVipImage( @"Data/images/foam_sep.vip" );

AverageObjectAreaPerSliceMsr result = Processing.AverageObjectAreaPerSlice3d( foam_sep, foam_sep );

Console.WriteLine(  "pixelCount: " + result.pixelCount( )  );