ObjectLinearDensity3d
Measures the structure linear density inside the volume of interest of a three-dimensional binary image.
Access to parameter description
For an introduction:
Plate, rod, and sphere model definitions of object linear density $Dn$ rely on the corresponding average object thickness $Th$ values: $$ Dn = \frac{V}{Th \times TV} $$ where $TV$ is total volume (volume of the mask if provided, else volume of the image bounding box) and $V$ is the object volume.
See also
Access to parameter description
For an introduction:
- section Image Analysis
- section Morphometry
Plate, rod, and sphere model definitions of object linear density $Dn$ rely on the corresponding average object thickness $Th$ values: $$ Dn = \frac{V}{Th \times TV} $$ where $TV$ is total volume (volume of the mask if provided, else volume of the image bounding box) and $V$ is the object volume.
See also
Function Syntax
This function returns the outputMeasurement output parameter.
// Function prototype. ObjectLinearDensityMsr::Ptr objectLinearDensity3d( std::shared_ptr< iolink::ImageView > inputImage, std::shared_ptr< iolink::ImageView > inputMaskImage, ObjectLinearDensity3d::Model model, ObjectLinearDensityMsr::Ptr outputMeasurement = NULL );
This function returns the outputMeasurement output parameter.
// Function prototype. object_linear_density_3d( input_image, input_mask_image, model = ObjectLinearDensity3d.Model.PARALLEL_PLATE_MODEL, output_measurement = None )
This function returns the outputMeasurement output parameter.
// Function prototype. public static ObjectLinearDensityMsr ObjectLinearDensity3d( IOLink.ImageView inputImage, IOLink.ImageView inputMaskImage, ObjectLinearDensity3d.Model model = ImageDev.ObjectLinearDensity3d.Model.PARALLEL_PLATE_MODEL, ObjectLinearDensityMsr outputMeasurement = null );
Class Syntax
Parameters
Class Name | ObjectLinearDensity3d |
---|
Parameter Name | Description | Type | Supported Values | Default Value | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
inputImage |
The 3D binary input 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 | |||||||
model |
The structure model used to compute the measurement.
|
Enumeration | PARALLEL_PLATE_MODEL | ||||||||
outputMeasurement |
The output measurement result. | ObjectLinearDensityMsr | nullptr |
Object Examples
auto foam_sep = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam_sep.vip" ); ObjectLinearDensity3d objectLinearDensity3dAlgo; objectLinearDensity3dAlgo.setInputImage( foam_sep ); objectLinearDensity3dAlgo.setInputMaskImage( foam_sep ); objectLinearDensity3dAlgo.setModel( ObjectLinearDensity3d::Model::PARALLEL_PLATE_MODEL ); objectLinearDensity3dAlgo.execute(); std::cout << "density: " << objectLinearDensity3dAlgo.outputMeasurement()->density( ) ;
foam_sep = imagedev.read_vip_image(imagedev_data.get_image_path("foam_sep.vip")) object_linear_density_3d_algo = imagedev.ObjectLinearDensity3d() object_linear_density_3d_algo.input_image = foam_sep object_linear_density_3d_algo.input_mask_image = foam_sep object_linear_density_3d_algo.model = imagedev.ObjectLinearDensity3d.PARALLEL_PLATE_MODEL object_linear_density_3d_algo.execute() print( print("density: ", object_linear_density_3d_algo.output_measurement.density( ) ) );
ImageView foam_sep = Data.ReadVipImage( @"Data/images/foam_sep.vip" ); ObjectLinearDensity3d objectLinearDensity3dAlgo = new ObjectLinearDensity3d { inputImage = foam_sep, inputMaskImage = foam_sep, model = ObjectLinearDensity3d.Model.PARALLEL_PLATE_MODEL }; objectLinearDensity3dAlgo.Execute(); Console.WriteLine( "density: " + objectLinearDensity3dAlgo.outputMeasurement.density( ) );
Function Examples
auto foam_sep = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam_sep.vip" ); auto result = objectLinearDensity3d( foam_sep, foam_sep, ObjectLinearDensity3d::Model::PARALLEL_PLATE_MODEL ); std::cout << "density: " << result->density( ) ;
foam_sep = imagedev.read_vip_image(imagedev_data.get_image_path("foam_sep.vip")) result = imagedev.object_linear_density_3d( foam_sep, foam_sep, imagedev.ObjectLinearDensity3d.PARALLEL_PLATE_MODEL ) print( "density: ", result.density( ) );
ImageView foam_sep = Data.ReadVipImage( @"Data/images/foam_sep.vip" ); ObjectLinearDensityMsr result = Processing.ObjectLinearDensity3d( foam_sep, foam_sep, ObjectLinearDensity3d.Model.PARALLEL_PLATE_MODEL ); Console.WriteLine( "density: " + result.density( ) );