IPSDK 4.2
IPSDK : Image Processing Software Development Kit
Clean Skeleton 3d
image = cleanSkeleton3dImg (inBinImg3d)

Detailed Description

Clean the input 3D skeleton image to keep only the longest branch.

This algorithm remove all secondary branches of a 3D skeleton in order to keep only the longest branch.

Here is an example of result of cleaned skeleton :

cleanSkeleton3dImg.png

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLAdvancedMorphology as advmorpho

Code Example

# opening of input image
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
# Comparison
outImg = advmorpho.cleanSkeleton3dImg(inImg)

Example of C++ code :

Example informations

Header file

#include <IPSDKIPL/IPSDKIPLAdvancedMorphology/Processor/CleanSkeleton3dImg/CleanSkeleton3dImg.h>

Code Example

// Load the input skeleton image
ImagePtr pInSkelImg = loadTiffImageFile(inputPath);
// Clean the skeleton
ImagePtr pOutImg = cleanSkeleton3dImg(pInSkelImg);