IPSDK 4.2
IPSDK : Image Processing Software Development Kit
Enforce Convexity 3d
imageenforceConvexity3dImg (inImg,halfKnlSize)
imageenforceConvexity3dImg (inImg,halfKnlSize,nbAngles)

Detailed Description

Removes concavities in the object of the 3d input image.

This algorithm modifies the 3D objects in the images to make them convex. The parameter halfKnlSize is the size of the biggest concavity to fill.

The algorithms relies on pair of oriented half linear structuring elements. For a given orientation, two opposite oriented half linear structuring elements are used to find neighbours with the same value. If such a neighbour is found, the same value is assigned to the current voxel.

The number of structuring element pairs is defined by the optional parameter nbAngles. This means that more the number of angles is high, more the result will be smooth but will require more calculations.

Here is an example of a result :

enforceConvexity3dImg.png

Possible artifacts: if the structuring element size is not long enough, only some voxels of the concavity will be filled, leading to undesired partial growth. Pleanse, see Enforce Convexity 3d for an illustration of such artifact.

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLBasicMorphology as morpho

Code Example

# opening of input image
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
# erosion 2d image computation
outImg = morpho.enforceConvexity3dImg(inImg, radius, nbAngles)

Example of C++ code :

Example informations

Header file

#include <IPSDKIPL/IPSDKIPLBasicMorphology/Processor/EnforceConvexity3dImg/EnforceConvexity3dImg.h>

Code Example

// opening input image
ImagePtr pInBinImg = loadTiffImageFile(inputPath);
// compute boundary on input image
ImagePtr pOutImg = enforceConvexity3dImg(pInBinImg, radius, nbAngles);