STIRA  0.1
Public Member Functions | List of all members
stira::imageanalysis::Thinning< T > Class Template Reference

Morphological thinning: applies the following set of structure elements;. More...

#include <Thinning.h>

Public Member Functions

 Thinning ()
 constructor
 
 ~Thinning ()
 destructor
 
ArrayGrid< T > * RunThinning (ArrayGrid< T > *pGridIn, common::RectangularROI< int > rroi, T value)
 run method More...
 
ArrayGrid< T > * RunPruning (ArrayGrid< T > *pGridIn, common::RectangularROI< int > rroi, T value)
 run method More...
 

Detailed Description

template<class T>
class stira::imageanalysis::Thinning< T >

Morphological thinning: applies the following set of structure elements;.

[ 0 0 0 ]     [   0 0 ]
[   1   ]     [ 1 1 0 ]
[ 1 1 1 ]     [   1   ]

http://homepages.inf.ed.ac.uk/rbf/HIPR2/thin.htm Structuring elements for skeletonization by morphological thinning. At each iteration, the image is first thinned by the left hand structuring element, and then by the right hand one, and then with the remaining six 90° rotations of the two elements. The process is repeated in cyclic fashion until none of the thinnings produces any further change. As usual, the origin of the structuring element is at the center.

Pruning end branches: only if we assume structure goes from border to border in image; otherwise all structure will be "eaten"

[ 1 0 0 ]    [ 0 1 0 ]    [ 0 0 1 ]    [ 0 0 0 ]
[ 0 1 0 ]    [ 0 1 0 ]    [ 0 1 0 ]    [ 0 1 1 ]
[ 0 0 0 ]    [ 0 0 0 ]    [ 0 0 0 ]    [ 0 0 0 ]
[ 0 0 0 ]    [ 0 0 0 ]    [ 0 0 0 ]    [ 0 0 0 ]
[ 0 1 0 ]    [ 0 1 0 ]    [ 0 1 0 ]    [ 1 1 0 ]
[ 0 0 1 ]    [ 0 1 0 ]    [ 1 0 0 ]    [ 0 0 0 ]

if one of the structure elements fits, the central pixel is set to the value of the neighbouring 0. This process is repeated until nothing changes anymore

Member Function Documentation

template<class T >
ArrayGrid< T > * stira::imageanalysis::Thinning< T >::RunPruning ( ArrayGrid< T > *  pGridIn,
common::RectangularROI< int >  rroi,
value 
)
template<class T >
ArrayGrid< T > * stira::imageanalysis::Thinning< T >::RunThinning ( ArrayGrid< T > *  pGridIn,
common::RectangularROI< int >  rroi,
value 
)

The documentation for this class was generated from the following file: