]> Creatis software - FrontAlgorithms.git/blob - lib/fpa/Image/MinimumSpanningTree.hxx
48a43cb8190504d74eaf015f2142dbb7bb19e84d
[FrontAlgorithms.git] / lib / fpa / Image / MinimumSpanningTree.hxx
1 #ifndef __FPA__IMAGE__MINIMUMSPANNINGTREE__HXX__
2 #define __FPA__IMAGE__MINIMUMSPANNINGTREE__HXX__
3
4 // -------------------------------------------------------------------------
5 template< class V, class N, class C, unsigned int D, unsigned long L >
6 fpa::Image::MinimumSpanningTree< V, N, C, D, L >::
7 MinimumSpanningTree( )
8   : Superclass( )
9 {
10 }
11
12 // -------------------------------------------------------------------------
13 template< class V, class N, class C, unsigned int D, unsigned long L >
14 fpa::Image::MinimumSpanningTree< V, N, C, D, L >::
15 ~MinimumSpanningTree( )
16 {
17 }
18
19 // -------------------------------------------------------------------------
20 template< class V, class N, class C, unsigned int D, unsigned long L >
21 long fpa::Image::MinimumSpanningTree< V, N, C, D, L >::
22 _FrontId( const V& v ) const
23 {
24   return( this->GetPixel( v ).FrontId );
25 }
26
27 // -------------------------------------------------------------------------
28 template< class V, class N, class C, unsigned int D, unsigned long L >
29 V fpa::Image::MinimumSpanningTree< V, N, C, D, L >::
30 _Parent( const V& v ) const
31 {
32   _TNode n = this->GetPixel( v );
33   if( n.Label == L )
34     return( n.Parent );
35   else
36     return( v );
37 }
38
39 #endif // __FPA__IMAGE__MINIMUMSPANNINGTREE__HXX__
40
41 // eof - $RCSfile$