]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Image/MinimumSpanningTree.hxx
...
[FrontAlgorithms.git] / lib / fpa / Image / MinimumSpanningTree.hxx
index b6161ee76578b0d916992dce21d073e3486852bb..9bd70838ae2066f8a214fbb645eedaeb2edb4dfa 100644 (file)
@@ -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 )