]> Creatis software - FrontAlgorithms.git/blobdiff - plugins/fpa/InvertCostFunction.cxx
...
[FrontAlgorithms.git] / plugins / fpa / InvertCostFunction.cxx
index 82631ef6bd0fe97286bd37076059fa467a23b00a..abd4f1ecf49d43de94fc6aa3472f075599e026ed 100644 (file)
@@ -30,19 +30,18 @@ fpaPlugins::InvertCostFunction::
 }
 
 // -------------------------------------------------------------------------
-std::string fpaPlugins::InvertCostFunction::
+void fpaPlugins::InvertCostFunction::
 _GenerateData( )
 {
   auto choice = this->m_Parameters.GetSelectedChoice( "ScalarType" );
-  if     ( choice == "float" )  return( this->_GD0< float >( ) );
-  else if( choice == "double" ) return( this->_GD0< double >( ) );
-  else
-    return( "fpaPlugins::InvertCostFunction: invalid scalar type." );
+  if     ( choice == "float" )  this->_GD0< float >( );
+  else if( choice == "double" ) this->_GD0< double >( );
+  else this->_Error( "Invalid scalar type." );
 }
 
 // -------------------------------------------------------------------------
 template< class _TScalar >
-std::string fpaPlugins::InvertCostFunction::
+void fpaPlugins::InvertCostFunction::
 _GD0( )
 {
   typedef fpa::Base::Functors::InvertCostFunction< _TScalar > _TFunctor;
@@ -57,7 +56,6 @@ _GD0( )
   } // fi
   f->SetAlpha( this->m_Parameters.GetReal( "Alpha" ) );
   f->SetBeta( this->m_Parameters.GetReal( "Beta" ) );
-  return( "" );
 }
 
 // eof - $RCSfile$