X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2Ffpa%2FImage%2FMinimumSpanningTree.hxx;h=9bd70838ae2066f8a214fbb645eedaeb2edb4dfa;hb=81c4e503782b69a433de83ffbe942eb774ac4a3f;hp=b6161ee76578b0d916992dce21d073e3486852bb;hpb=09046275d77a6f1bb9e6a309f22f9510fba13550;p=FrontAlgorithms.git diff --git a/lib/fpa/Image/MinimumSpanningTree.hxx b/lib/fpa/Image/MinimumSpanningTree.hxx index b6161ee..9bd7083 100644 --- a/lib/fpa/Image/MinimumSpanningTree.hxx +++ b/lib/fpa/Image/MinimumSpanningTree.hxx @@ -32,7 +32,8 @@ GetPolyLineParametricPath( ) const { TVertices v = this->GetPath( a ); - path = TPolyLineParametricPath::New( ); + if( path.IsNull( ) ) + path = TPolyLineParametricPath::New( ); path->SetReferenceImage( this ); typename TVertices::const_iterator vIt = v.begin( ); for( ; vIt != v.end( ); ++vIt ) @@ -48,7 +49,8 @@ GetPolyLineParametricPath( ) const { TVertices v = this->GetPath( a, b ); - path = TPolyLineParametricPath::New( ); + if( path.IsNull( ) ) + path = TPolyLineParametricPath::New( ); path->SetReferenceImage( this ); typename TVertices::const_iterator vIt = v.begin( ); for( ; vIt != v.end( ); ++vIt )