Dilation3d
Performs a three-dimensional dilation using a structuring element matching with a full or partial cube.
Access to parameter description
For an introduction:
This algorithm uses a basic structuring element with 6, 18 or 26 neighbors, according to the neighborhood parameter.

Figure 1. Structuring elements: 6, 18 and 26 neighbors
See also
Access to parameter description
For an introduction:
- section Mathematical Morphology
- section Introduction To Dilation
This algorithm uses a basic structuring element with 6, 18 or 26 neighbors, according to the neighborhood parameter.

Figure 1. Structuring elements: 6, 18 and 26 neighbors
Function Syntax
This function returns outputImage.
// Function prototype
std::shared_ptr< iolink::ImageView > dilation3d( std::shared_ptr< iolink::ImageView > inputImage, uint32_t kernelRadius, Dilation3d::Neighborhood neighborhood, std::shared_ptr< iolink::ImageView > outputImage = NULL );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
inputImage |
The input image. The image type can be integer or float. | Image | Binary, Label, Grayscale or Multispectral | nullptr | ||||||
![]() |
kernelRadius |
The number of iterations (the half size of the structuring element, in voxels). A cube structuring element always has an odd side length (3x3x3, 5x5x5, etc.) which is defined by twice the kernel radius + 1. | UInt32 | >=1 | 3 | ||||||
![]() |
neighborhood |
The 3D neighborhood configuration.
|
Enumeration | CONNECTIVITY_26 | |||||||
![]() |
outputImage |
The output image. Its dimensions and type are forced to the same values as the input image. | Image | nullptr |
Object Examples
auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" ); Dilation3d dilation3dAlgo; dilation3dAlgo.setInputImage( foam ); dilation3dAlgo.setKernelRadius( 3 ); dilation3dAlgo.setNeighborhood( Dilation3d::Neighborhood::CONNECTIVITY_26 ); dilation3dAlgo.execute(); std::cout << "outputImage:" << dilation3dAlgo.outputImage()->toString();
Function Examples
auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" ); auto result = dilation3d( foam, 3, Dilation3d::Neighborhood::CONNECTIVITY_26 ); std::cout << "outputImage:" << result->toString();