IPSDK 0.2
IPSDK : Image Processing Software Development Kit
Remove small shape 3dSee full documentation
imageremoveSmallShape3dImg (inBinLabImg3d,inMinShapeSize)

Detailed Description

removal of small connected component in binary or label 3d image

This algorithm allows to remove connected components into a binary or label 3d input image associated to a number of voxels lower than a given input threshold value InMinShapeSize.

Output result image OutImg has same type as input image InBinLabImg3d. This means that an input binary image will produce an output binary image and that an input label image will produce an output label image. Note that in label case, input labels index are reordered to fill index list holes created by shape filtering.

Here is an example of small connected component removal on an image 3d :

removeSmallShape3dImg.png

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLAdvancedMorphology as advmorpho

Code Example

# opening of input image
inBinImg3d = PyIPSDK.loadTiffImageFile(inputImgPath)
# connected component analysis
labImg3d = advmorpho.connectedComponent3dImg(inBinImg3d)
# compute small shape removal on input image
# note: algorithm can also be used with input binary image
outImg = advmorpho.removeSmallShape3dImg(labImg3d, 5000)

Example of C++ code :

Example informations

Header file

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

Code Example

// opening input image
ImagePtr pInBinImg = loadTiffImageFile(inputImgPath);
// compute small shape removal on input image
// note: algorithm can also be used with input label image
ImagePtr pOutImg = removeSmallShape3dImg(pInBinImg, 5000);