]> Creatis software - FrontAlgorithms.git/blob - lib/fpa/Image/MinimumSpanningTree.hxx
...
[FrontAlgorithms.git] / lib / fpa / Image / MinimumSpanningTree.hxx
1 #ifndef __fpa__Image__MinimumSpanningTree__hxx__
2 #define __fpa__Image__MinimumSpanningTree__hxx__
3
4 // -------------------------------------------------------------------------
5 template< unsigned int _VDim >
6 typename fpa::Image::MinimumSpanningTree< _VDim >::
7 TVertex fpa::Image::MinimumSpanningTree< _VDim >::
8 GetParent( const TVertex& v ) const
9 {
10   TVertex p = v + this->GetPixel( v );
11   return( p );
12 }
13
14 // -------------------------------------------------------------------------
15 template< unsigned int _VDim >
16 void fpa::Image::MinimumSpanningTree< _VDim >::
17 SetParent( const TVertex& v, const TVertex& p )
18 {
19   this->SetPixel( v, p - v );
20 }
21
22 // -------------------------------------------------------------------------
23 template< unsigned int _VDim >
24 void fpa::Image::MinimumSpanningTree< _VDim >::
25 GetPath( typename TPath::Pointer& path, const TVertex& a ) const
26 {
27   this->Superclass::GetPath( path, a );
28   path->SetReferenceImage( this );
29 }
30
31 // -------------------------------------------------------------------------
32 template< unsigned int _VDim >
33 void fpa::Image::MinimumSpanningTree< _VDim >::
34 GetPath(
35   typename TPath::Pointer& path, const TVertex& a, const TVertex& b
36   ) const
37 {
38   this->Superclass::GetPath( path, a, b );
39   path->SetReferenceImage( this );
40 }
41
42 // -------------------------------------------------------------------------
43 template< unsigned int _VDim >
44 fpa::Image::MinimumSpanningTree< _VDim >::
45 MinimumSpanningTree( )
46   : Superclass( )
47 {
48 }
49
50 // -------------------------------------------------------------------------
51 template< unsigned int _VDim >
52 fpa::Image::MinimumSpanningTree< _VDim >::
53 ~MinimumSpanningTree( )
54 {
55 }
56
57 #endif // __fpa__Image__MinimumSpanningTree__hxx__
58
59 // eof - $RCSfile$