ImageDev

TotalImageBoundaryArea

Measures the total image boundary area of the volume of interest defined in a binary image.

Access to parameter description

For an introduction: This algorithm measures the surface $TS$ of a volume of interest boundary.
On a 2D image, this measurement is more precisely a perimeter and has dimension 1. On a 3D image, it is a surface area and has dimension 2.
If no mask is provided, it corresponds to the bounding box area of the input image. If a mask is provided, it corresponds to the area of the mask image.

Usage without a mask

where

Usage with a mask

where See also

Function Syntax

This function returns outputMeasurement.
// Function prototype
ImageBoundaryAreaMsr::Ptr totalImageBoundaryArea( std::shared_ptr< iolink::ImageView > inputBinaryImage, std::shared_ptr< iolink::ImageView > inputMaskImage, ImageBoundaryAreaMsr::Ptr outputMeasurement = NULL );
This function returns outputMeasurement.
// Function prototype.
total_image_boundary_area( input_binary_image, input_mask_image, output_measurement = None )
This function returns outputMeasurement.
// Function prototype.
public static ImageBoundaryAreaMsr
TotalImageBoundaryArea( IOLink.ImageView inputBinaryImage,
                        IOLink.ImageView inputMaskImage,
                        ImageBoundaryAreaMsr outputMeasurement = null );

Class Syntax

Parameters

Class Name TotalImageBoundaryArea

Parameter Name Description Type Supported Values Default Value
input
inputBinaryImage
The input binary 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. ImageBoundaryAreaMsr nullptr

Object Examples

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

TotalImageBoundaryArea totalImageBoundaryAreaAlgo;
totalImageBoundaryAreaAlgo.setInputBinaryImage( polystyrene_sep );
totalImageBoundaryAreaAlgo.setInputMaskImage( polystyrene_mask );
totalImageBoundaryAreaAlgo.execute();

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

total_image_boundary_area_algo = imagedev.TotalImageBoundaryArea()
total_image_boundary_area_algo.input_binary_image = polystyrene_sep
total_image_boundary_area_algo.input_mask_image = polystyrene_mask
total_image_boundary_area_algo.execute()

print( "pixelCount: ", str( total_image_boundary_area_algo.output_measurement.pixel_count( 0 ) ) )
ImageView polystyrene_sep = Data.ReadVipImage( @"Data/images/polystyrene_sep.vip" );
ImageView polystyrene_mask = Data.ReadVipImage( @"Data/images/polystyrene_mask.vip" );

TotalImageBoundaryArea totalImageBoundaryAreaAlgo = new TotalImageBoundaryArea
{
    inputBinaryImage = polystyrene_sep,
    inputMaskImage = polystyrene_mask
};
totalImageBoundaryAreaAlgo.Execute();

Console.WriteLine( "pixelCount: " + totalImageBoundaryAreaAlgo.outputMeasurement.pixelCount( 0 ) );

Function Examples

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

auto result = totalImageBoundaryArea( polystyrene_sep, polystyrene_mask );

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

result = imagedev.total_image_boundary_area( polystyrene_sep, polystyrene_mask )

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

ImageBoundaryAreaMsr result = Processing.TotalImageBoundaryArea( polystyrene_sep, polystyrene_mask );

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