image = | binaryReconstruction3dImg (inBinImg3d,inBinMarkImg3d) |
Binary reconstruction of an image 3d.
This algorithm allows to reconstruct an input binary image InBinImg3d using a marker input image InBinMarkImg3d with respect to a given neighborhood 3d policy (see 3d neighborhood models).
The reconstruction of InBinImg3d from InBinMarkImg3d is the union of connected components of InBinImg3d which contain at least a pixel of InBinMarkImg3d.
It can also be seen as the dilation of InBinMarkImg3d into InBinImg3d until convergence.
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 binary reconstruction of an image operation is illustrated in 2d case : see Binary Reconstruction 2d.
- Note
- See "Morphological Grayscale Reconstruction in Image Analysis: Applications and Efficient Algorithms, Luc Vicent, IEEE Transactions on Image Processing, 1993, Volume 2, 176-201" for more informations on this algorithm.
Example of Python code :
Example imports
import PyIPSDK
import PyIPSDK.IPSDKIPLAdvancedMorphology as advmorpho
Code Example
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
inMarkImg = PyIPSDK.loadTiffImageFile(inputMarkImgPath)
outImg = advmorpho.binaryReconstruction3dImg(inImg, inMarkImg)
Example of C++ code :
Example informations
Header file
#include <IPSDKIPL/IPSDKIPLAdvancedMorphology/Processor/BinaryReconstruction3dImg/BinaryReconstruction3dImg.h>
Code Example
ImagePtr pOutImg = binaryReconstruction3dImg(pInBinImg3d, pInBinMarkImg3d);