ObjectVolume
Measures the volume of objects contained in a volume of interest defined in a binary image.
Access to parameter description
For an introduction:
Access to parameter description
For an introduction:
- section Image Analysis
- section Morphometry
- On a 2D image, V corresponds to the 2D area Ar given by the Area2d algorithm and has dimension 2.
- On a 3D image, V corresponds to the 3D volume given by the IntensityIntegral3d algorithm in the binary case and has dimension 3.
Function Syntax
This function returns outputMeasurement.
// Function prototype
ObjectVolumeMsr::Ptr objectVolume( std::shared_ptr< iolink::ImageView > inputBinaryImage, std::shared_ptr< iolink::ImageView > inputMaskImage, ObjectVolumeMsr::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. | ObjectVolumeMsr | 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" ); ObjectVolume objectVolumeAlgo; objectVolumeAlgo.setInputBinaryImage( polystyrene_sep ); objectVolumeAlgo.setInputMaskImage( polystyrene_mask ); objectVolumeAlgo.execute(); std::cout << "pixelCount: " << objectVolumeAlgo.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 = objectVolume( polystyrene_sep, polystyrene_mask ); std::cout << "pixelCount: " << result->pixelCount( 0 ) ;