image = | fillHole3dImg (inBinImg3d) |
holes filling in a binary 3d image
This algorithm allows to fill holes inside connected components in an input binary image InBinImg3d with respect to a given neighborhood 3d policy (see 3d neighborhood models).
Two versions of this algorithm are implemented which can be selected using attribute InOptOptimizationPolicy which associated to enumerate ipsdk::imaproc::attr::eProcessingOptimizationPolicy :
- a 'fast' version using a binary and a label intermediate image (which can optionally be provided via OutOptWk1BinImg and OutOptWk1LabelImg attributes)
- a low memory consumption iterative algorithm which propagate reconstructed elements until convergence.
An example of hole filling algorithm is illustrated in 2d case : see Fill hole 2d.
Example of Python code :
Example imports
import PyIPSDK
import PyIPSDK.IPSDKIPLAdvancedMorphology as advmorpho
Code Example
inBinImg3d = PyIPSDK.loadTiffImageFile(inputImgPath)
outImg = advmorpho.fillHole3dImg(inBinImg3d)
Example of C++ code :
Example informations
Header file
#include <IPSDKIPL/IPSDKIPLAdvancedMorphology/Processor/FillHole3dImg/FillHole3dImg.h>
Code Example
ImagePtr pInBinImg3d =
loadTiffImageFile(inputImgPath, eTiffDirectoryMode::eTDM_Volume, eTiffBufferMode::eTBM_Binary);
ImagePtr pOutImg = fillHole3dImg(pInBinImg3d);