IPSDK 4.1.0.2
IPSDK : Image Processing Software Development Kit
Skeleton 3d calculation
imageskeleton3dImg (inBinImg3d)
imageskeleton3dImg (inBinImg3d,skeletonAlgoType)

Detailed Description

computes the 3d skeleton image from a binary image

The skeleton provides morphological and topological properties of an object. This function computes the image of skeletons from the objects present in the input binary image by iterative thinnings.

Two algorithms are available to compute the default or the smooth skeletons from the input binary image.

Here is the result of the default skeleton operation applied to a binary 3d image :

skeleton3dImg.png

For the first approach, the objects are iteratively reduced by eliminating all voxels at the borders except the corners matching specific templates, rotated along 12 directions.

The method used for the smooth calculation algorithm was proposed by Lee et al. [1] and is approximately 20% to 25% slower than the default approach. In this iterative approach, voxels on each border are removed successively.

For a given border, we first check if a voxel can be deleted in a parallel way. Deletable voxels coordinates are noted and a sequential pass on these voxels validates the removals.

During this sequential check, a voxel in the list built during the parallel calculation can really be removed if it is still deletable after removing previous voxels in the list.

The results of the smooth skeleton calculation are similar than the skeletonize function provided by the ITK BinaryThinningImageFilter3D algorithm.

See also
https://github.com/InsightSoftwareConsortium/ITKThickness3D/blob/master/include/itkBinaryThinningImageFilter3D.hxx

Here is the comparison of the two skeleton operations applied to the binary image illustrated above, by zooming on a border of the image. We can notice that the default algorithm (left) propagates the skeleton untill the image border whereas the smooth algorithm (right) ignore the 'Y' pattern :

skeleton3dImg.png

[1] Ta-Chih Lee, Rangasami L. Kashyap and Chong-Nam Chu "Building skeleton models via 3-D medial surface/axis thinning algorithms." Computer Vision, Graphics, and Image Processing, 56(6):462�478, 1994.

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.skeleton3dImg(inImg, PyIPSDK.eSkeletonAlgoType.eSAT_Smooth)

Example of C++ code :

Example informations

Header file

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

Code Example

// opening input image
ImagePtr pInBinImg = loadTiffImageFile(inputImgPath);
// compute boundary on input image
ImagePtr pOutImg = skeleton3dImg(pInBinImg);