]> Creatis software - FrontAlgorithms.git/blobdiff - plugins/fpa/MinimumSpanningTreeWriter.cxx
...
[FrontAlgorithms.git] / plugins / fpa / MinimumSpanningTreeWriter.cxx
index 97570068a5b9195dd223a75fc5ee4a8e23a8c8b6..d0f35598b07966a50b2092c15b165fc90015e685 100644 (file)
@@ -24,7 +24,7 @@ fpaPlugins::MinimumSpanningTreeWriter::
 }
 
 // -------------------------------------------------------------------------
-std::string fpaPlugins::MinimumSpanningTreeWriter::
+void fpaPlugins::MinimumSpanningTreeWriter::
 _GenerateData( )
 {
   typedef fpa::Image::MinimumSpanningTree< 2 > _2D;
@@ -33,15 +33,14 @@ _GenerateData( )
   auto _2d = this->GetInputData( "Input" )->GetITK< _2D >( );
   auto _3d = this->GetInputData( "Input" )->GetITK< _3D >( );
 
-  if     ( _2d != NULL ) return( this->_GD0( _2d ) );
-  else if( _3d != NULL ) return( this->_GD0( _3d ) );
-  else
-    return( "MinimumSpanningTreeWriter: Not a valid MST." );
+  if     ( _2d != NULL ) this->_GD0( _2d );
+  else if( _3d != NULL ) this->_GD0( _3d );
+  else this->_Error( "Not a valid MST." );
 }
 
 // -------------------------------------------------------------------------
 template< class _TTree >
-std::string fpaPlugins::MinimumSpanningTreeWriter::
+void fpaPlugins::MinimumSpanningTreeWriter::
 _GD0( _TTree* tree )
 {
   typedef fpa::IO::MinimumSpanningTreeWriter< _TTree > _TFilter;
@@ -55,12 +54,9 @@ _GD0( _TTree* tree )
   }
   catch( itk::ExceptionObject& err )
   {
-    return(
-      "MinimumSpanningTreeWriter: " + std::string( err.GetDescription( ) )
-      );
+    this->_Error( err.GetDescription( ) );
 
   } // yrt
-  return( "" );
 }
 
 // eof - $RCSfile$