From: Leonardo Florez-Valencia Date: Tue, 11 Oct 2016 01:31:48 +0000 (-0500) Subject: ... X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=8c19a41f8998fc325b504488569401be9f66fc13;p=FrontAlgorithms.git ... --- diff --git a/lib/fpa/Image/MinimumSpanningTree.hxx b/lib/fpa/Image/MinimumSpanningTree.hxx index 162526c..b99953b 100644 --- a/lib/fpa/Image/MinimumSpanningTree.hxx +++ b/lib/fpa/Image/MinimumSpanningTree.hxx @@ -24,8 +24,10 @@ template< unsigned int _VDim > void fpa::Image::MinimumSpanningTree< _VDim >:: GetPath( typename TPath::Pointer& path, const TVertex& a ) const { - this->Superclass::GetPath( path, a ); + if( path.GetPointer( ) == NULL ) + path = TPath::New( ); path->SetReferenceImage( this ); + this->Superclass::GetPath( path, a ); } // ------------------------------------------------------------------------- @@ -35,8 +37,10 @@ GetPath( typename TPath::Pointer& path, const TVertex& a, const TVertex& b ) const { - this->Superclass::GetPath( path, a, b ); + if( path.GetPointer( ) == NULL ) + path = TPath::New( ); path->SetReferenceImage( this ); + this->Superclass::GetPath( path, a, b ); } // -------------------------------------------------------------------------