image = | pruning3dImg (inBinImg3d) |
image = | pruning3dImg (inBinImg3d,nbMaxIter) |
image = | pruning3dImg_keepAll (inBinImg3d) |
image = | pruning3dImg_keepAll (inBinImg3d,nbMaxIter) |
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.