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 \times (gx \times cx + gy \times cy) $
- On a 3D image $ TS = 2 \times (gx \times cx \times gy \times cy + gy \times cy \times gz \times cz + gx \times cx \times gz \times 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 = nullptr );
This function returns outputMeasurement.
// Function prototype. total_image_boundary_area(input_binary_image: idt.ImageType, input_mask_image: idt.ImageType, output_measurement: Union[Any, None] = None) -> ImageBoundaryAreaMsr
This function returns outputMeasurement.
// Function prototype. public static ImageBoundaryAreaMsr TotalImageBoundaryArea( IOLink.ImageView inputBinaryImage, IOLink.ImageView inputMaskImage, ImageBoundaryAreaMsr 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 |
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
input_binary_image |
The input binary image. | image | Binary | None | |
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_measurement |
The output measurement result. | ImageBoundaryAreaMsr | None |
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
inputBinaryImage |
The input binary image. | Image | Binary | null | |
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 | |
outputMeasurement |
The output measurement result. | ImageBoundaryAreaMsr | null |
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 ) );