LocalDensityMap3d
Measures the local density of a three-dimensional binary image within a binary mask.
Access to parameter description
This algorithm computes the density using a region formed by the intersection of a mask image and a user-defined kernel.
Access to parameter description
This algorithm computes the density using a region formed by the intersection of a mask image and a user-defined kernel.
- Pixels are assigned the percentage of pixels with a value of 1 inside this region. These values are expressed in the interval [0, 100].
- Pixels outside of the mask are assigned the value -1.
Function Syntax
This function returns the outputImage output parameter.
// Function prototype. std::shared_ptr< iolink::ImageView > localDensityMap3d( std::shared_ptr< iolink::ImageView > inputBinaryImage, std::shared_ptr< iolink::ImageView > inputMaskImage, iolink::Vector3i32 kernelSize, std::shared_ptr< iolink::ImageView > outputImage = NULL );
This function returns the outputImage output parameter.
// Function prototype. local_density_map_3d( input_binary_image, input_mask_image, kernel_size = [3, 3, 3], output_image = None )
This function returns the outputImage output parameter.
// Function prototype. public static IOLink.ImageView LocalDensityMap3d( IOLink.ImageView inputBinaryImage, IOLink.ImageView inputMaskImage, int[] kernelSize = null, IOLink.ImageView outputImage = null );
Class Syntax
Parameters
Class Name | LocalDensityMap3d |
---|
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
inputBinaryImage |
The input binary image. | Image | Binary | nullptr | |
inputMaskImage |
The binary mask image. This image must have same dimensions and type as the main input image. | Image | Binary | nullptr | |
kernelSize |
The side size in voxels of the cubic kernel. | Vector3i32 | >0 | {3, 3, 3} | |
outputImage |
Its dimensions are forced to the same values as the input. Its data type is forced to floating point. | Image | nullptr |
Object Examples
auto foam_sep = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam_sep.vip" ); LocalDensityMap3d localDensityMap3dAlgo; localDensityMap3dAlgo.setInputBinaryImage( foam_sep ); localDensityMap3dAlgo.setInputMaskImage( foam_sep ); localDensityMap3dAlgo.setKernelSize( {3, 3, 3} ); localDensityMap3dAlgo.execute(); std::cout << "outputImage:" << localDensityMap3dAlgo.outputImage()->toString();
foam_sep = imagedev.read_vip_image(imagedev_data.get_image_path("foam_sep.vip")) local_density_map_3d_algo = imagedev.LocalDensityMap3d() local_density_map_3d_algo.input_binary_image = foam_sep local_density_map_3d_algo.input_mask_image = foam_sep local_density_map_3d_algo.kernel_size = [3, 3, 3] local_density_map_3d_algo.execute() print( "output_image:", str( local_density_map_3d_algo.output_image ) )
ImageView foam_sep = Data.ReadVipImage( @"Data/images/foam_sep.vip" ); LocalDensityMap3d localDensityMap3dAlgo = new LocalDensityMap3d { inputBinaryImage = foam_sep, inputMaskImage = foam_sep, kernelSize = new int[]{3, 3, 3} }; localDensityMap3dAlgo.Execute(); Console.WriteLine( "outputImage:" + localDensityMap3dAlgo.outputImage.ToString() );
Function Examples
auto foam_sep = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam_sep.vip" ); auto result = localDensityMap3d( foam_sep, foam_sep, {3, 3, 3} ); std::cout << "outputImage:" << result->toString();
foam_sep = imagedev.read_vip_image(imagedev_data.get_image_path("foam_sep.vip")) result = imagedev.local_density_map_3d( foam_sep, foam_sep, [3, 3, 3] ) print( "output_image:", str( result ) )
ImageView foam_sep = Data.ReadVipImage( @"Data/images/foam_sep.vip" ); IOLink.ImageView result = Processing.LocalDensityMap3d( foam_sep, foam_sep, new int[]{3, 3, 3} ); Console.WriteLine( "outputImage:" + result.ToString() );