This algorithm fills the holes inside particles, irrespective of their size.
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.
// Function prototype.publicstaticIOLink.ImageViewFillHoles3d(IOLink.ImageView inputObjectImage,FillHoles3d.Neighborhood neighborhood =ImageDev.FillHoles3d.Neighborhood.CONNECTIVITY_26,IOLink.ImageView outputObjectImage =null);
Class Syntax
// Command constructor.FillHoles3d();/// Gets the inputObjectImage parameter./// The 3D binary input image.
std::shared_ptr< iolink::ImageView> inputObjectImage()const;/// Sets the inputObjectImage parameter./// The 3D binary input image.void setInputObjectImage( std::shared_ptr< iolink::ImageView> inputObjectImage );/// Gets the neighborhood parameter./// The 3D neighborhood configuration.FillHoles3d::Neighborhood neighborhood()const;/// Sets the neighborhood parameter./// The 3D neighborhood configuration.void setNeighborhood(constFillHoles3d::Neighborhood& neighborhood );/// Gets the outputObjectImage parameter./// The binary output image. Its dimensions are forced to the same values as the input.
std::shared_ptr< iolink::ImageView> outputObjectImage()const;/// Sets the outputObjectImage parameter./// The binary output image. Its dimensions are forced to the same values as the input.void setOutputObjectImage( std::shared_ptr< iolink::ImageView> outputObjectImage );// Method to launch the command.void execute();
# Property of the inputObjectImage parameter.FillHoles3d.input_object_image
# Property of the neighborhood parameter.FillHoles3d.neighborhood
# Property of the outputObjectImage parameter.FillHoles3d.output_object_image
// Method to launch the command.
execute()
// Command constructor.FillHoles3d()// Property of the inputObjectImage parameter.FillHoles3d.inputObjectImage
// Property of the neighborhood parameter.FillHoles3d.neighborhood
// Property of the outputObjectImage parameter.FillHoles3d.outputObjectImage
// Method to launch the command.Execute()
Parameters
Parameter Name
Description
Type
Supported Values
Default Value
inputObjectImage
The 3D binary input image.
Image
Binary or Label
nullptr
neighborhood
The 3D neighborhood configuration.
CONNECTIVITY_6
The structuring element is composed of voxels with a common face with the voxel of interest.
CONNECTIVITY_18
The structuring element is composed of voxels with at least one common edge.
CONNECTIVITY_26
The structuring element is a full cube.
Enumeration
CONNECTIVITY_26
outputObjectImage
The binary output image. Its dimensions are forced to the same values as the input.
Image
nullptr
Parameter Name
Description
Type
Supported Values
Default Value
input_object_image
The 3D binary input image.
image
Binary or Label
None
neighborhood
The 3D neighborhood configuration.
CONNECTIVITY_6
The structuring element is composed of voxels with a common face with the voxel of interest.
CONNECTIVITY_18
The structuring element is composed of voxels with at least one common edge.
CONNECTIVITY_26
The structuring element is a full cube.
enumeration
CONNECTIVITY_26
output_object_image
The binary output image. Its dimensions are forced to the same values as the input.
image
None
Parameter Name
Description
Type
Supported Values
Default Value
inputObjectImage
The 3D binary input image.
Image
Binary or Label
null
neighborhood
The 3D neighborhood configuration.
CONNECTIVITY_6
The structuring element is composed of voxels with a common face with the voxel of interest.
CONNECTIVITY_18
The structuring element is composed of voxels with at least one common edge.
CONNECTIVITY_26
The structuring element is a full cube.
Enumeration
CONNECTIVITY_26
outputObjectImage
The binary output image. Its dimensions are forced to the same values as the input.