IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit

Algorithm for image 3d closing. More...

IPSDKIPLBASICMORPHOLOGY_API image::ImagePtr ipsdk::imaproc::morpho::closing3dImg (const image::ImageConstPtr &pInImg3d, const StructuringElementXYZInfoConstPtr &pInSEXYZ)
 wrapper function for Algorithm for image 3d closing More...
 
IPSDKIPLBASICMORPHOLOGY_API image::ImagePtr ipsdk::imaproc::morpho::closing3dImg (const image::ImageConstPtr &pInImg3d, const StructuringElementXYZInfoConstPtr &pInSEXYZ, const attr::eBorderExtensionPolicy &inOptBorderExtensionPolicy)
 wrapper function for Algorithm for image 3d closing More...
 
IPSDKIPLBASICMORPHOLOGY_API void ipsdk::imaproc::morpho::closing3dImg (const image::ImageConstPtr &pInImg3d, const StructuringElementXYZInfoConstPtr &pInSEXYZ, const attr::eBorderExtensionPolicy &inOptBorderExtensionPolicy, const image::ImagePtr &pOutImg)
 wrapper function for Algorithm for image 3d closing More...
 

Detailed Description

Algorithm for image 3d closing.

Morphological closing of an image by a given structuring element InSEXYZ is defined as the erosion of the dilation of image by InSEXYZ :

\[ OutImg = InImg3d \odot InSEXYZ = (InImg3d \oplus InSEXYZ) \ominus InSEXYZ \]

See Erosion 3d and Dilation 3d respectively for more informations about these operations.

Note
Behavior of this algorithm is specialized using specific morphological structuring elements (see 3d structuring elements for more informations about these shapes).
Please refer to Usage for examples of usage of different types of specific structuring elements during morphological operations.

An example of a closing operation is illustrated in 2d case : see Closing 2d.

Note
By default this algorithm uses a fast but inexact method to handle data for which a contact may be created with image borders after first dilation step. Indeed, dilation step do not allows to keep a notion of deepness of such created image border contacts and then erosion step may keep these contacts when it should not. To avoid such errors user can set input algorithm parameter InOptBorderExtensionPolicy to value ipsdk::imaproc::attr::eBorderExtensionPolicy::eBEP_Enable. This will allow to handle exactly previous case at the cost of some computing times and of an additional allocated enlarged image. An example of such problems is illustrated in 2d case : see Closing 2d.
See also
http://en.wikipedia.org/wiki/Closing_%28morphology%29
Note
This algorithm is associated with two temporary working images. These working temporary images can be provided by user or will be automatically allocated when requested.

Attributes description

Attribute description for algorithm :

Name ToolTip Default Initializer
ipsdk::imaproc::attr::InImg3d [Input] 3d image for operation X
ipsdk::imaproc::attr::InSEXYZ [Input] structuring element xyz for processing operation X
ipsdk::imaproc::attr::InOptBorderExtensionPolicy [Input Optional] flag indicating border extension policy for processing X
ipsdk::imaproc::attr::OutOptWk1Img [Output Optional] Temporary working image for algorithm X
ipsdk::imaproc::attr::OutOptWk2Img [Output Optional] Temporary working image for algorithm X
ipsdk::imaproc::attr::OutImg [Output] image for processing operation ipsdk::imaproc::duplicateInOut (_pOutImg, _pInImg3d)

Global Rule description

Global rule description for algorithm :
((ipsdk::imaproc::matchSizeAndType (_pInImg3d,_pOutImg)) && 
 (ipsdk::processor::ifIsSet (_pOutOptWk1Img,
   ipsdk::imaproc::customImageProperty (_pOutOptWk1Img,
    matchBorderExtension1 (_pInImg3d,_pInSEXYZ,_pInOptBorderExtensionPolicy)))) && 
 (ipsdk::processor::ifIsSet (_pOutOptWk2Img,
   ipsdk::imaproc::customImageProperty (_pOutOptWk2Img,
    matchBorderExtension2 (_pInImg3d,_pInSEXYZ,_pInOptBorderExtensionPolicy)))))

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLBasicMorphology as morpho

Code Example

# opening of input image
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
# definition of used structuring element
inSE = PyIPSDK.sphericalSEXYZInfo(2)
# closing 3d image computation
outImg = morpho.closing3dImg(inImg, inSE)

Example of C++ code :

Example informations

Associated library

IPSDKIPLBasicMorphology

Header file

Code Example

// create a 2x3x4 rectangular structuring element
// opening input image
ImagePtr pInImg = loadTiffImageFile(inputImgPath);
// compute closing on input image
ImagePtr pOutImg = closing3dImg(pInImg, pInSEXYZ);
See also
Closing3dImgLvl1

Function Documentation

◆ closing3dImg() [1/3]

IPSDKIPLBASICMORPHOLOGY_API image::ImagePtr ipsdk::imaproc::morpho::closing3dImg ( const image::ImageConstPtr pInImg3d,
const StructuringElementXYZInfoConstPtr pInSEXYZ 
)

wrapper function for Algorithm for image 3d closing

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ closing3dImg() [2/3]

IPSDKIPLBASICMORPHOLOGY_API image::ImagePtr ipsdk::imaproc::morpho::closing3dImg ( const image::ImageConstPtr pInImg3d,
const StructuringElementXYZInfoConstPtr pInSEXYZ,
const attr::eBorderExtensionPolicy inOptBorderExtensionPolicy 
)

wrapper function for Algorithm for image 3d closing

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ closing3dImg() [3/3]

IPSDKIPLBASICMORPHOLOGY_API void ipsdk::imaproc::morpho::closing3dImg ( const image::ImageConstPtr pInImg3d,
const StructuringElementXYZInfoConstPtr pInSEXYZ,
const attr::eBorderExtensionPolicy inOptBorderExtensionPolicy,
const image::ImagePtr pOutImg 
)

wrapper function for Algorithm for image 3d closing

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure