IPSDK 0.2
IPSDK : Image Processing Software Development Kit
Pruning of 3d skeletonsSee full documentation
imagepruning3dImg (inBinImg3d)
imagepruning3dImg (inBinImg3d,nbMaxIter)
imagepruning3dImg_keepAll (inBinImg3d)
imagepruning3dImg_keepAll (inBinImg3d,nbMaxIter)

Detailed Description

Reduces 3D skeleton branches. If enough iterations are processed, the branches are completely removed.

This algorithm iteratively reduces the branches of skeletons in the 3d input binary image. For a single pass, voxels with a single neighbour are detected and are deleted. The algorithm repeats the process untill the output image does not change anymore.

However, it is possible to limit the number of iterations to keep parts of some branches by specifying the parameter nbMaxIter.

When the image contains skeletons without loop (i.e. the object that generated the skeleton does not have holes), the pruning operation completely remove the object. In order to keep a record of the presence of such objects, it is possible to call the function pruning3dImg_keepAll instead of the standard wrapper. This way, the result for a skeleton without loop is an isolated single voxel.

Please, see Pruning of 2d skeletons for an example of application of pruning on a 2D image.

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLBasicMorphology as morpho

Code Example

# opening of input image
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
# boundary 2d image computation
outImg = morpho.pruning3dImg(inImg)

Example of C++ code :

Example informations

Header file

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

Code Example

// compute pruning on input image
ImagePtr pOutImg = pruning3dImg(pInBinImg);