image = | removeBorder3dImg (inBinLabImg3d) |
removal of connected components in contact with image borders in binary 3d images
This algorithm allows to remove connected components in contact with at least an image border in an input binary image InBinLabImg3d with respect to a given neighborhood 3d policy (see 3d neighborhood models).
Two versions of binary 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. These parameters are ignored in case of input label image.
An example of border removal is illustrated in 2d case : see Remove Border 2d.
Example of Python code :
Example imports
import PyIPSDK
import PyIPSDK.IPSDKIPLAdvancedMorphology as advmorpho
Code Example
inBinImg = PyIPSDK.loadTiffImageFile(inputImgPath)
outImg = advmorpho.removeBorder3dImg(inBinImg)
Example of C++ code :
Example informations
Header file
#include <IPSDKIPL/IPSDKIPLAdvancedMorphology/Processor/RemoveBorder3dImg/RemoveBorder3dImg.h>
Code Example
ImagePtr pOutImg = removeBorder3dImg(pInBinImg);