]> Creatis software - FrontAlgorithms.git/blobdiff - plugins/fpa/RegionGrowThresholdFunction.cxx
...
[FrontAlgorithms.git] / plugins / fpa / RegionGrowThresholdFunction.cxx
index 1c27fe57023d2b650a052676a3b3ad39ccf7b91b..8dc341f1b6dbe9ce40fce099ce4dbb81599e3dd6 100644 (file)
@@ -25,28 +25,25 @@ fpaPlugins::RegionGrowThresholdFunction::
 }
 
 // -------------------------------------------------------------------------
-std::string fpaPlugins::RegionGrowThresholdFunction::
+void fpaPlugins::RegionGrowThresholdFunction::
 _GenerateData( )
 {
   auto image =
     this->GetInputData( "ReferenceImage" )->GetITK< itk::DataObject >( );
-  std::string   cpPlugin_Image_Demangle_Pixel_AllScalars( r, _GD0, image, 2 );
-  if( r != "" ) cpPlugin_Image_Demangle_Pixel_AllScalars( r, _GD0, image, 3 );
-  return( r );
+  cpPlugins_Image_Demangle_Pixel_AllScalars     ( _GD0, image, 2 );
+  else cpPlugins_Image_Demangle_Pixel_AllScalars( _GD0, image, 3 );
+  else this->_Error( "No valid input image." );
 }
 
 // -------------------------------------------------------------------------
 template< class _TImage >
-std::string fpaPlugins::RegionGrowThresholdFunction::
+void fpaPlugins::RegionGrowThresholdFunction::
 _GD0( _TImage* image )
 {
   typedef
     fpa::Image::Functors::RegionGrowThresholdFunction< _TImage >
     _TFunctor;
 
-  if( image == NULL )
-    return( "fpaPlugins::RegionGrowThresholdFunction: invalid image type." );
-
   auto out = this->GetOutputData( "Output" );
   auto f = out->GetITK< _TFunctor >( );
   if( f == NULL )
@@ -58,7 +55,6 @@ _GD0( _TImage* image )
   } // fi
   f->SetLowerThreshold( this->m_Parameters.GetReal( "LowerThreshold" ) );
   f->SetUpperThreshold( this->m_Parameters.GetReal( "UpperThreshold" ) );
-  return( "" );
 }
 
 // eof - $RCSfile$