TotalImageBoundaryArea
Measures the total image boundary area of the volume of interest defined in a binary image.
Access to parameter description
For an introduction:
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.
Access to parameter description
For an introduction:
- section Image Analysis
- section Morphometry
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
- On a 2D image TS=2×(gx×cx+gy×cy)
- On a 3D image TS=2×(gx×cx×gy×cy+gy×cy×gz×cz+gx×cx×gz×cz)
- gx, gy and gz represent the image size in pixel coordinates along the X, Y, and Z axes respectively.
- cx, cy and cz represent the image calibration spacing in world coordinates along the X, Y, and Z axes.
Usage with a mask
- On a 2D image TS=P(M)
- On a 3D image TS=S(M)
- M is the binary mask image.
- P is the Crofton Perimeter.
- S is the 3D surface area given by the Area3d algorithm.
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 );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
![]() |
inputBinaryImage |
The input binary image. | Image | Binary | nullptr |
![]() |
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 |
![]() |
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 ) ;
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 ) ;