ImageDev

Area3d

Computes the surface area of foreground voxels in a three-dimensional binary image.

Access to parameter description

For an introduction: section Image Analysis.
Area3d approximates the surface area of the object boundary.

In the continuous case, let x(t), y(t) and z(t) be a parametric representation of the boundary curve X, its area is obtained as: $$L(X)=\int_{\delta X} \sqrt{x'^2+y'^2+z'^2}dt$$
This formula has no obvious discrete equivalent, and is therefore mostly useless for our purposes.

This algorithm uses an intercept method to take into account the exposed surface of the outer voxels.
The idea of this method is that, depending on the type of connectivity relying two boundary voxels, their contribution to the area can vary from a factor 1 to 3.
This measurement can be seen as a 3D extension of the Crofton perimeter formula by using 13 intercept directions.

This approximation is especially irrelevant for objects made of few voxels. For an isolated voxel, it underestimates the surface as 50% of the sum of voxels faces area. For a cube made of more than 5000 voxels the error rate falls below 10%.

See also

Function Syntax

This function returns outputMeasurement.
// Function prototype
Area3dMsr::Ptr area3d( std::shared_ptr< iolink::ImageView > inputBinaryImage, Area3dMsr::Ptr outputMeasurement = nullptr );
This function returns outputMeasurement.
// Function prototype.
area_3d(input_binary_image: idt.ImageType,
        output_measurement: Union[Any, None] = None) -> Area3dMsr
This function returns outputMeasurement.
// Function prototype.
public static Area3dMsr
Area3d( IOLink.ImageView inputBinaryImage, Area3dMsr outputMeasurement = null );

Class Syntax

Parameters

Parameter Name Description Type Supported Values Default Value
input
inputBinaryImage
The 3D binary input image. Image Binary nullptr
output
outputMeasurement
The output measurement results. Area3dMsr nullptr
Parameter Name Description Type Supported Values Default Value
input
input_binary_image
The 3D binary input image. image Binary None
output
output_measurement
The output measurement results. Area3dMsr None
Parameter Name Description Type Supported Values Default Value
input
inputBinaryImage
The 3D binary input image. Image Binary null
output
outputMeasurement
The output measurement results. Area3dMsr null

Object Examples

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

Area3d area3dAlgo;
area3dAlgo.setInputBinaryImage( foam_sep );
area3dAlgo.execute();

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

area_3d_algo = imagedev.Area3d()
area_3d_algo.input_binary_image = foam_sep
area_3d_algo.execute()

print("area: ", str(area_3d_algo.output_measurement.area()))
ImageView foam_sep = Data.ReadVipImage( @"Data/images/foam_sep.vip" );

Area3d area3dAlgo = new Area3d
{
    inputBinaryImage = foam_sep
};
area3dAlgo.Execute();

Console.WriteLine( "area: " + area3dAlgo.outputMeasurement.area( ) );

Function Examples

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

auto result = area3d( foam_sep );

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

result = imagedev.area_3d(foam_sep)

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

Area3dMsr result = Processing.Area3d( foam_sep );

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