]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Plugins/BasicFilters/BinaryErodeImageFilter.cxx
MAC compilation issues solved... Now some tests please
[cpPlugins.git] / lib / cpPlugins / Plugins / BasicFilters / BinaryErodeImageFilter.cxx
index fb9d6ea704476436de736fccc1d4deaff65f334e..f4dd37b7f8e64bed757b81ff2508327f5c3954e2 100644 (file)
@@ -27,11 +27,7 @@ cpPlugins::BasicFilters::BinaryErodeImageFilter::
 std::string cpPlugins::BasicFilters::BinaryErodeImageFilter::
 _GenerateData( )
 {
-  cpPlugins::Interface::Image* image =
-    this->GetInput< cpPlugins::Interface::Image >( "Input" );
-  if( image == NULL )
-    return( "BinaryErodeImageFilter: No input image." );
-
+  auto image = this->GetInputData< cpPlugins::Interface::Image >( "Input" );
   itk::DataObject* itk_image = NULL;
   std::string r = "";
   cpPlugins_Image_Demangle_AllScalarTypes( 2, image, itk_image, r, _GD0 );
@@ -79,15 +75,9 @@ _RealGD( itk::DataObject* image )
   filter->Update( );
 
   // Connect output
-  cpPlugins::Interface::Image* out =
-    this->GetOutput< cpPlugins::Interface::Image >( "Output" );
-  if( out != NULL )
-  {
-    out->SetITK< O >( filter->GetOutput( ) );
-    return( "" );
-  }
-  else
-    return( "BinaryErodeImageFilter: output not correctly created." );
+  auto out = this->GetOutputData< cpPlugins::Interface::Image >( "Output" );
+  out->SetITK( filter->GetOutput( ) );
+  return( "" );
 }
 
 // eof - $RCSfile$