ImageDev

ObjectBoundaryArea

Measures the surface of objects contained in the volume of interest of a binary image.

Access to parameter description

For an introduction: This algorithm measures the surface area $S$ of solid objects. This algorithm takes into account the input image calibration (spacing) and returns thus results in world coordinates.

See also

Function Syntax

This function returns the outputMeasurement output parameter.
// Function prototype.
ObjectBoundaryAreaMsr::Ptr
objectBoundaryArea( std::shared_ptr< iolink::ImageView > inputBinaryImage,
                    std::shared_ptr< iolink::ImageView > inputMaskImage,
                    ObjectBoundaryAreaMsr::Ptr outputMeasurement = NULL );
This function returns the outputMeasurement output parameter.
// Function prototype.
object_boundary_area( input_binary_image, input_mask_image, output_measurement = None )
This function returns the outputMeasurement output parameter.
// Function prototype.
public static ObjectBoundaryAreaMsr
ObjectBoundaryArea( IOLink.ImageView inputBinaryImage,
                    IOLink.ImageView inputMaskImage,
                    ObjectBoundaryAreaMsr outputMeasurement = null );

Class Syntax

Parameters

Class Name ObjectBoundaryArea

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 pixels having a 1 value in this image. If it equals null, the computation is performed from all pixels of the input image. It must have same dimensions as the input image. Image Binary nullptr
output
outputMeasurement
The output measurement result. ObjectBoundaryAreaMsr 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" );

ObjectBoundaryArea objectBoundaryAreaAlgo;
objectBoundaryAreaAlgo.setInputBinaryImage( polystyrene_sep );
objectBoundaryAreaAlgo.setInputMaskImage( polystyrene_mask );
objectBoundaryAreaAlgo.execute();

std::cout << "surface: " << objectBoundaryAreaAlgo.outputMeasurement()->surface( 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"))

object_boundary_area_algo = imagedev.ObjectBoundaryArea()
object_boundary_area_algo.input_binary_image = polystyrene_sep
object_boundary_area_algo.input_mask_image = polystyrene_mask
object_boundary_area_algo.execute()

print( 
print("surface: ", object_boundary_area_algo.output_measurement.surface( 0 ) ) );
ImageView polystyrene_sep = Data.ReadVipImage( @"Data/images/polystyrene_sep.vip" );
ImageView polystyrene_mask = Data.ReadVipImage( @"Data/images/polystyrene_mask.vip" );

ObjectBoundaryArea objectBoundaryAreaAlgo = new ObjectBoundaryArea
{
    inputBinaryImage = polystyrene_sep,
    inputMaskImage = polystyrene_mask
};
objectBoundaryAreaAlgo.Execute();

Console.WriteLine( "surface: " + objectBoundaryAreaAlgo.outputMeasurement.surface( 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 = objectBoundaryArea( polystyrene_sep, polystyrene_mask );

std::cout << "surface: " << result->surface( 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.object_boundary_area( polystyrene_sep, polystyrene_mask )

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

ObjectBoundaryAreaMsr result = Processing.ObjectBoundaryArea( polystyrene_sep, polystyrene_mask );

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