IPSDK 4.2
IPSDK : Image Processing Software Development Kit
Remove Holes 3d
imageremoveSmallHoles3dImg (inBinImg3d,minShapeSize)
imageremoveBigHoles3dImg (inBinImg3d,minShapeSize)

Detailed Description

Removes small or big holes in a binary 3d image.

This algorithm allows to remove small or big holes in a 3D binary image.

removeSmallHoles3dImg removes small holes with a number of voxels lower than InMinShapeSize.

removeBigHoles3dImg removes small holes with a number of voxels higher than InMinShapeSize.

Here is an example of small and big holes removals:

removeHoles3dImg.png

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLAdvancedMorphology as advmorpho

Code Example

# opening of input image
inBinImg = PyIPSDK.loadTiffImageFile(inputImgPath)
# Remove small holes
outImgSmall = advmorpho.removeSmallHoles2dImg(inBinImg, 600)
# Remove big holes
outImgBig = advmorpho.removeBigHoles2dImg(inBinImg, 600)

Example of C++ code :

Example informations

Header file

#include <IPSDKIPL/IPSDKIPLAdvancedMorphology/Processor/RemoveHoles3dImg/RemoveHoles3dImg.h>

Code Example

// opening input image
ImagePtr pInBinImg = loadTiffImageFile(inputImgPath);
// Remove small holes
ImagePtr pOutImgSmall = removeSmallHoles3dImg(pInBinImg, 600);
// Remove big holes
ImagePtr pOutImgBig = removeBigHoles3dImg(pInBinImg, 600);