FillHoles3d
Fills the holes inside particles of a three-dimensional binary image.
Access to parameter description
For an introduction:
Holes inside objects are filled using a numerical reconstruction applied on the complement of the input image, from markers made of voxels of the image frame.

Figure 1. Illustration of the hole filling algorithm
Note: Since the reconstruction is applied on the input image complement, selecting a 6-neighbor connectivity fills holes connected to the background with a 26-neighbor connectivity.
See also
Access to parameter description
For an introduction:
- section Mathematical Morphology
- section Reconstruction From Markers
Holes inside objects are filled using a numerical reconstruction applied on the complement of the input image, from markers made of voxels of the image frame.

Figure 1. Illustration of the hole filling algorithm
Note: Since the reconstruction is applied on the input image complement, selecting a 6-neighbor connectivity fills holes connected to the background with a 26-neighbor connectivity.
See also
Function Syntax
This function returns outputObjectImage.
// Function prototype
std::shared_ptr< iolink::ImageView > fillHoles3d( std::shared_ptr< iolink::ImageView > inputObjectImage, FillHoles3d::Neighborhood neighborhood, std::shared_ptr< iolink::ImageView > outputObjectImage = NULL );
Class Syntax
Parameters
Class Name | FillHoles3d |
---|
Parameter Name | Description | Type | Supported Values | Default Value | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
inputObjectImage |
The 3D binary input image. | Image | Binary | nullptr | ||||||
![]() |
neighborhood |
The 3D neighborhood configuration.
|
Enumeration | CONNECTIVITY_26 | |||||||
![]() |
outputObjectImage |
The binary output image. Its dimensions are forced to the same values as the input. | Image | nullptr |
Object Examples
auto foam_sep = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam_sep.vip" ); FillHoles3d fillHoles3dAlgo; fillHoles3dAlgo.setInputObjectImage( foam_sep ); fillHoles3dAlgo.setNeighborhood( FillHoles3d::Neighborhood::CONNECTIVITY_26 ); fillHoles3dAlgo.execute(); std::cout << "outputObjectImage:" << fillHoles3dAlgo.outputObjectImage()->toString();
Function Examples
auto foam_sep = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam_sep.vip" ); auto result = fillHoles3d( foam_sep, FillHoles3d::Neighborhood::CONNECTIVITY_26 ); std::cout << "outputObjectImage:" << result->toString();