#ifndef __fpa__Image__MinimumSpanningTree__hxx__ #define __fpa__Image__MinimumSpanningTree__hxx__ // ------------------------------------------------------------------------- template< unsigned int _VDim > typename fpa::Image::MinimumSpanningTree< _VDim >:: TVertex fpa::Image::MinimumSpanningTree< _VDim >:: GetParent( const TVertex& v ) const { TVertex p = v + this->GetPixel( v ); return( p ); } // ------------------------------------------------------------------------- template< unsigned int _VDim > void fpa::Image::MinimumSpanningTree< _VDim >:: SetParent( const TVertex& v, const TVertex& p ) { this->SetPixel( v, p - v ); } // ------------------------------------------------------------------------- template< unsigned int _VDim > typename fpa::Image::MinimumSpanningTree< _VDim >:: TPoints fpa::Image::MinimumSpanningTree< _VDim >:: GetEuclideanPath( const TVertex& a ) const { TVertices path = this->GetPath( a ); TPoints points; for( auto v = path.begin( ); v != path.end( ); ++v ) { TPoint p; this->TransformIndexToPhysicalPoint( *v, p ); points.push_back( p ); } // rof return( points ); } // ------------------------------------------------------------------------- template< unsigned int _VDim > typename fpa::Image::MinimumSpanningTree< _VDim >:: TPoints fpa::Image::MinimumSpanningTree< _VDim >:: GetEuclideanPath( const TVertex& a, const TVertex& b ) const { TVertices path = this->GetPath( a, b ); TPoints points; for( auto v = path.begin( ); v != path.end( ); ++v ) { TPoint p; this->TransformIndexToPhysicalPoint( *v, p ); points.push_back( p ); } // rof return( points ); } // ------------------------------------------------------------------------- template< unsigned int _VDim > fpa::Image::MinimumSpanningTree< _VDim >:: MinimumSpanningTree( ) : Superclass( ) { } // ------------------------------------------------------------------------- template< unsigned int _VDim > fpa::Image::MinimumSpanningTree< _VDim >:: ~MinimumSpanningTree( ) { } #endif // __fpa__Image__MinimumSpanningTree__hxx__ // eof - $RCSfile$