11.34. ITK Grayscale Fillhole Image Filter
Fills dark “holes” in a grayscale image — enclosed dark spots that are not connected to the image border.
Group (Subgroup)
ITKMathematicalMorphology (MathematicalMorphology)
Description
This filter fills holes in a grayscale image. A hole is a local minimum (a dark spot) that is fully enclosed by brighter pixels and not connected to the image border. The filter raises each hole up to the gray level of the surrounding pixels, smoothing over dark spots while leaving bright features (local maxima) untouched.
A useful trick: subtract the original image from this filter’s output (and optionally threshold the difference) to obtain a map of the dark spots that were filled. The dual operation, which removes bright peaks instead, is ITK Grayscale Grind Peak Image Filter.
Parameter Guidance
Fully Connected — controls neighbor connectivity when deciding whether a region is “enclosed” (face-only versus face + edge + corner). Turn it on for thin, one-pixel-wide structures.
Required Input Sources
Operates on any scalar (grayscale) image — typically from Read Image, Read Images [3D Stack], or the output of a prior ITK image filter.

Reference
Pierre Soille, Morphological Image Analysis: Principles and Applications, Second Edition, Springer, 2003 (Chapter 6).
Input Parameter(s)
Parameter Name |
Parameter Type |
Parameter Notes |
Description |
|---|---|---|---|
Fully Connected |
Bool |
Set/Get whether the connected components are defined strictly by face connectivity or by face+edge+vertex connectivity. Default is FullyConnectedOff. For objects that are 1 pixel wide, use FullyConnectedOn. |
Input Cell Data
Parameter Name |
Parameter Type |
Parameter Notes |
Description |
|---|---|---|---|
Image Geometry |
Geometry Selection |
Image |
Select the Image Geometry Group from the DataStructure. |
Input Cell Data |
Array Selection |
Allowed Types: int8, uint8, int16, uint16, int32, uint32, int64, uint64, float32, float64 |
The image data that will be processed by this filter. |
Output Cell Data
Parameter Name |
Parameter Type |
Parameter Notes |
Description |
|---|---|---|---|
Output Cell Data |
DataObjectName |
The result of the processing will be stored in this Data Array inside the same group as the input data. |
Example Pipelines
License & Copyright
Please see the description file distributed with this Plugin
DREAM3D-NX Help
If you need help, need to file a bug report or want to request a new feature, please head over to the DREAM3DNX-Issues GitHub site where the community of DREAM3D-NX users can help answer your questions.