ObjectSurfaceDensity
Measures the ratio of surface area to the total volume of objects contained inside the volume of interest of 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 $ OSD = P/T.Ar $
- On a 3D image $ OSD = S/TV $
- $P$ is the object Crofton Perimeter.
- $T.Ar$ is the total area (area of the mask if provided, else area of the image bounding box).
- $S$ is the object surface area calculated using the Area3d algorithm.
- $TV$ is the total volume (volume of the mask if provided, else volume of the image bounding box).
Function Syntax
This function returns outputMeasurement.
// Function prototype
ObjectSurfaceDensityMsr::Ptr objectSurfaceDensity( std::shared_ptr< iolink::ImageView > inputBinaryImage, std::shared_ptr< iolink::ImageView > inputMaskImage, ObjectSurfaceDensityMsr::Ptr outputMeasurement = NULL );
This function returns outputMeasurement.
// Function prototype. object_surface_density( input_binary_image, input_mask_image, output_measurement = None )
This function returns outputMeasurement.
// Function prototype. public static ObjectSurfaceDensityMsr ObjectSurfaceDensity( IOLink.ImageView inputBinaryImage, IOLink.ImageView inputMaskImage, ObjectSurfaceDensityMsr 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. | ObjectSurfaceDensityMsr | 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. | ObjectSurfaceDensityMsr | 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. | ObjectSurfaceDensityMsr | 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" ); ObjectSurfaceDensity objectSurfaceDensityAlgo; objectSurfaceDensityAlgo.setInputBinaryImage( polystyrene_sep ); objectSurfaceDensityAlgo.setInputMaskImage( polystyrene_mask ); objectSurfaceDensityAlgo.execute(); std::cout << "density: " << objectSurfaceDensityAlgo.outputMeasurement()->density( 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_surface_density_algo = imagedev.ObjectSurfaceDensity() object_surface_density_algo.input_binary_image = polystyrene_sep object_surface_density_algo.input_mask_image = polystyrene_mask object_surface_density_algo.execute() print( "density: ", str( object_surface_density_algo.output_measurement.density( 0 ) ) )
ImageView polystyrene_sep = Data.ReadVipImage( @"Data/images/polystyrene_sep.vip" ); ImageView polystyrene_mask = Data.ReadVipImage( @"Data/images/polystyrene_mask.vip" ); ObjectSurfaceDensity objectSurfaceDensityAlgo = new ObjectSurfaceDensity { inputBinaryImage = polystyrene_sep, inputMaskImage = polystyrene_mask }; objectSurfaceDensityAlgo.Execute(); Console.WriteLine( "density: " + objectSurfaceDensityAlgo.outputMeasurement.density( 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 = objectSurfaceDensity( polystyrene_sep, polystyrene_mask ); std::cout << "density: " << result->density( 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_surface_density( polystyrene_sep, polystyrene_mask ) print( "density: ", str( result.density( 0 ) ) )
ImageView polystyrene_sep = Data.ReadVipImage( @"Data/images/polystyrene_sep.vip" ); ImageView polystyrene_mask = Data.ReadVipImage( @"Data/images/polystyrene_mask.vip" ); ObjectSurfaceDensityMsr result = Processing.ObjectSurfaceDensity( polystyrene_sep, polystyrene_mask ); Console.WriteLine( "density: " + result.density( 0 ) );