// -------------------------------------------------------------------------
template< unsigned int _VDim >
-typename fpa::Image::MinimumSpanningTree< _VDim >::
-TPoints fpa::Image::MinimumSpanningTree< _VDim >::
-GetEuclideanPath( const TVertex& a ) const
+void fpa::Image::MinimumSpanningTree< _VDim >::
+GetPath( typename TPath::Pointer& path, 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 );
+ this->Superclass::GetPath( path, a );
+ path->SetReferenceImage( this );
}
// -------------------------------------------------------------------------
template< unsigned int _VDim >
-typename fpa::Image::MinimumSpanningTree< _VDim >::
-TPoints fpa::Image::MinimumSpanningTree< _VDim >::
-GetEuclideanPath( const TVertex& a, const TVertex& b ) const
+void fpa::Image::MinimumSpanningTree< _VDim >::
+GetPath(
+ typename TPath::Pointer& path, 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 );
+ this->Superclass::GetPath( path, a, b );
+ path->SetReferenceImage( this );
}
// -------------------------------------------------------------------------