ImageDev

DilationBall3d

Performs a three-dimensional erosion using a structuring element matching with a sphere.

Access to parameter description

For an introduction: This command supports two modes: a fast mode that approximates a spherical structuring element by combining dilations using 6, 18 and 26 neighborhoods, and a precise mode (slower) that ensures a real spherical structuring element. The mode can be selected with the precision parameter.

See also

Function Syntax

This function returns outputImage.
// Function prototype
std::shared_ptr< iolink::ImageView > dilationBall3d( std::shared_ptr< iolink::ImageView > inputImage, uint32_t kernelRadius, DilationBall3d::Precision precision, std::shared_ptr< iolink::ImageView > outputImage = nullptr );
This function returns outputImage.
// Function prototype.
dilation_ball_3d(input_image: idt.ImageType,
                 kernel_radius: int = 3,
                 precision: DilationBall3d.Precision = DilationBall3d.Precision.FASTER,
                 output_image: idt.ImageType = None) -> idt.ImageType
This function returns outputImage.
// Function prototype.
public static IOLink.ImageView
DilationBall3d( IOLink.ImageView inputImage,
                UInt32 kernelRadius = 3,
                DilationBall3d.Precision precision = ImageDev.DilationBall3d.Precision.FASTER,
                IOLink.ImageView outputImage = null );

Class Syntax

Parameters

Parameter Name Description Type Supported Values Default Value
input
inputImage
The input image. The image type can be integer or float. Image Binary, Label, Grayscale or Multispectral nullptr
input
kernelRadius
The length of the sphere radius in voxels. UInt32 >=1 3
input
precision
The precision of the computation method.
FASTER The operation is computed with the fast mode, which approximates a circular structuring element by combining erosions using 6, 18 and 26 neighborhoods.
PRECISE The operation is computed with the precise mode (slower), which ensures a real spherical structuring element.
Enumeration FASTER
output
outputImage
The output image. Its dimensions and type are forced to the same values as the input image. Image nullptr
Parameter Name Description Type Supported Values Default Value
input
input_image
The input image. The image type can be integer or float. image Binary, Label, Grayscale or Multispectral None
input
kernel_radius
The length of the sphere radius in voxels. uint32 >=1 3
input
precision
The precision of the computation method.
FASTER The operation is computed with the fast mode, which approximates a circular structuring element by combining erosions using 6, 18 and 26 neighborhoods.
PRECISE The operation is computed with the precise mode (slower), which ensures a real spherical structuring element.
enumeration FASTER
output
output_image
The output image. Its dimensions and type are forced to the same values as the input image. image None
Parameter Name Description Type Supported Values Default Value
input
inputImage
The input image. The image type can be integer or float. Image Binary, Label, Grayscale or Multispectral null
input
kernelRadius
The length of the sphere radius in voxels. UInt32 >=1 3
input
precision
The precision of the computation method.
FASTER The operation is computed with the fast mode, which approximates a circular structuring element by combining erosions using 6, 18 and 26 neighborhoods.
PRECISE The operation is computed with the precise mode (slower), which ensures a real spherical structuring element.
Enumeration FASTER
output
outputImage
The output image. Its dimensions and type are forced to the same values as the input image. Image null

Object Examples

auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" );

DilationBall3d dilationBall3dAlgo;
dilationBall3dAlgo.setInputImage( foam );
dilationBall3dAlgo.setKernelRadius( 3 );
dilationBall3dAlgo.setPrecision( DilationBall3d::Precision::FASTER );
dilationBall3dAlgo.execute();

std::cout << "outputImage:" << dilationBall3dAlgo.outputImage()->toString();
foam = imagedev.read_vip_image(imagedev_data.get_image_path("foam.vip"))

dilation_ball_3d_algo = imagedev.DilationBall3d()
dilation_ball_3d_algo.input_image = foam
dilation_ball_3d_algo.kernel_radius = 3
dilation_ball_3d_algo.precision = imagedev.DilationBall3d.FASTER
dilation_ball_3d_algo.execute()

print("output_image:", str(dilation_ball_3d_algo.output_image))
ImageView foam = Data.ReadVipImage( @"Data/images/foam.vip" );

DilationBall3d dilationBall3dAlgo = new DilationBall3d
{
    inputImage = foam,
    kernelRadius = 3,
    precision = DilationBall3d.Precision.FASTER
};
dilationBall3dAlgo.Execute();

Console.WriteLine( "outputImage:" + dilationBall3dAlgo.outputImage.ToString() );

Function Examples

auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" );

auto result = dilationBall3d( foam, 3, DilationBall3d::Precision::FASTER );

std::cout << "outputImage:" << result->toString();
foam = imagedev.read_vip_image(imagedev_data.get_image_path("foam.vip"))

result = imagedev.dilation_ball_3d(foam, 3, imagedev.DilationBall3d.FASTER)

print("output_image:", str(result))
ImageView foam = Data.ReadVipImage( @"Data/images/foam.vip" );

IOLink.ImageView result = Processing.DilationBall3d( foam, 3, DilationBall3d.Precision.FASTER );

Console.WriteLine( "outputImage:" + result.ToString() );