IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit

Binary reconstruction of an image 3d. More...

IPSDKIPLADVANCEDMORPHOLOGY_API image::ImagePtr ipsdk::imaproc::advmorpho::binaryReconstruction3dImg (const image::ImageConstPtr &pInBinImg3d, const image::ImageConstPtr &pInBinMarkImg3d)
 wrapper function for Binary reconstruction of an image 3d More...
 
IPSDKIPLADVANCEDMORPHOLOGY_API void ipsdk::imaproc::advmorpho::binaryReconstruction3dImg (const image::ImageConstPtr &pInBinImg3d, const image::ImageConstPtr &pInBinMarkImg3d, const ipsdk::eNeighborhood3dType &inOptNeighborhood3d, const ipsdk::imaproc::attr::eProcessingOptimizationPolicy &inOptOptimizationPolicy, const image::ImagePtr &pOutImg)
 wrapper function for Binary reconstruction of an image 3d More...
 

Detailed Description

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 :

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.

Attributes description

Attribute description for algorithm :

Name ToolTip Default Initializer
ipsdk::imaproc::attr::InBinImg3d [Input] binary 3d image for processing operation X
ipsdk::imaproc::attr::InBinMarkImg3d [Input] binary 3d marker image for processing operation X
ipsdk::imaproc::attr::InOptNeighborhood3d [Input optional] neighborhood 3d type for operation X
ipsdk::imaproc::attr::InOptOptimizationPolicy [Input Optional] processing optimization policy for algorithm X
ipsdk::imaproc::attr::OutOptWk1BinImg [Output Optional] Temporary working image for algorithm X
ipsdk::imaproc::attr::OutOptWk1LabelImg [Output Optional] Temporary working image for algorithm X
ipsdk::imaproc::attr::OutImg [Output] image for processing operation ipsdk::imaproc::duplicateInOut (_pOutImg, _pInBinImg3d)

Global Rule description

Global rule description for algorithm :
((ipsdk::imaproc::matchSize (_pInBinImg3d,_pInBinMarkImg3d)) && 
 (ipsdk::imaproc::matchSizeAndType (_pInBinImg3d,_pOutImg)) && 
 (ipsdk::processor::ifIsSet (
   _pOutOptWk1BinImg, (
    ipsdk::imaproc::matchSize (_pInBinImg3d,_pOutOptWk1BinImg)))) && 
 (ipsdk::processor::ifIsSet (
   _pOutOptWk1LabelImg, (
    ipsdk::imaproc::matchSize (_pInBinImg3d,_pOutOptWk1LabelImg)))))

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLAdvancedMorphology as advmorpho

Code Example

# opening of input images
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
inMarkImg = PyIPSDK.loadTiffImageFile(inputMarkImgPath)
# binary reconstruction 3d computation
outImg = advmorpho.binaryReconstruction3dImg(inImg, inMarkImg)

Example of C++ code :

Example informations

Associated library

IPSDKIPLAdvancedMorphology

Header file

Code Example

// opening input image
ImagePtr pInBinImg3d = loadTiffImageFile(inputImgPath);
// opening input image
ImagePtr pInBinMarkImg3d = loadTiffImageFile(inputMarkImgPath);
// compute binary reconstruction of input image using input mark image
ImagePtr pOutImg = binaryReconstruction3dImg(pInBinImg3d, pInBinMarkImg3d);
See also
BinaryReconstruction3dImgLvl1

Function Documentation

◆ binaryReconstruction3dImg() [1/2]

IPSDKIPLADVANCEDMORPHOLOGY_API image::ImagePtr ipsdk::imaproc::advmorpho::binaryReconstruction3dImg ( const image::ImageConstPtr pInBinImg3d,
const image::ImageConstPtr pInBinMarkImg3d 
)

wrapper function for Binary reconstruction of an image 3d

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ binaryReconstruction3dImg() [2/2]

IPSDKIPLADVANCEDMORPHOLOGY_API void ipsdk::imaproc::advmorpho::binaryReconstruction3dImg ( const image::ImageConstPtr pInBinImg3d,
const image::ImageConstPtr pInBinMarkImg3d,
const ipsdk::eNeighborhood3dType inOptNeighborhood3d,
const ipsdk::imaproc::attr::eProcessingOptimizationPolicy inOptOptimizationPolicy,
const image::ImagePtr pOutImg 
)

wrapper function for Binary reconstruction of an image 3d

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure