1 #ifndef __fpa__Image__MinimumSpanningTree__hxx__
2 #define __fpa__Image__MinimumSpanningTree__hxx__
4 // -------------------------------------------------------------------------
5 template< unsigned int _VDim >
6 typename fpa::Image::MinimumSpanningTree< _VDim >::
7 TVertex fpa::Image::MinimumSpanningTree< _VDim >::
8 GetParent( const TVertex& v ) const
10 TVertex p = v + this->GetPixel( v );
14 // -------------------------------------------------------------------------
15 template< unsigned int _VDim >
16 void fpa::Image::MinimumSpanningTree< _VDim >::
17 SetParent( const TVertex& v, const TVertex& p )
19 this->SetPixel( v, p - v );
22 // -------------------------------------------------------------------------
23 template< unsigned int _VDim >
24 typename fpa::Image::MinimumSpanningTree< _VDim >::
25 TPoints fpa::Image::MinimumSpanningTree< _VDim >::
26 GetEuclideanPath( const TVertex& a ) const
28 TVertices path = this->GetPath( a );
30 for( auto v = path.begin( ); v != path.end( ); ++v )
33 this->TransformIndexToPhysicalPoint( *v, p );
34 points.push_back( p );
40 // -------------------------------------------------------------------------
41 template< unsigned int _VDim >
42 typename fpa::Image::MinimumSpanningTree< _VDim >::
43 TPoints fpa::Image::MinimumSpanningTree< _VDim >::
44 GetEuclideanPath( const TVertex& a, const TVertex& b ) const
46 TVertices path = this->GetPath( a, b );
48 for( auto v = path.begin( ); v != path.end( ); ++v )
51 this->TransformIndexToPhysicalPoint( *v, p );
52 points.push_back( p );
58 // -------------------------------------------------------------------------
59 template< unsigned int _VDim >
60 fpa::Image::MinimumSpanningTree< _VDim >::
61 MinimumSpanningTree( )
66 // -------------------------------------------------------------------------
67 template< unsigned int _VDim >
68 fpa::Image::MinimumSpanningTree< _VDim >::
69 ~MinimumSpanningTree( )
73 #endif // __fpa__Image__MinimumSpanningTree__hxx__