]> 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 91402f5b4b1595a8e850a2b7b775c2ee10867a08..f4dd37b7f8e64bed757b81ff2508327f5c3954e2 100644 (file)
@@ -10,7 +10,7 @@ cpPlugins::BasicFilters::BinaryErodeImageFilter::
 BinaryErodeImageFilter( )
   : Superclass( )
 {
-  this->_AddInput( "Input", true );
+  this->_AddInput( "Input" );
   this->_AddOutput< cpPlugins::Interface::Image >( "Output" );
 
   this->m_Parameters->ConfigureAsUint( "Radius" );
@@ -28,9 +28,6 @@ std::string cpPlugins::BasicFilters::BinaryErodeImageFilter::
 _GenerateData( )
 {
   auto image = this->GetInputData< cpPlugins::Interface::Image >( "Input" );
-  if( image == NULL )
-    return( "BinaryErodeImageFilter: No input image." );
-
   itk::DataObject* itk_image = NULL;
   std::string r = "";
   cpPlugins_Image_Demangle_AllScalarTypes( 2, image, itk_image, r, _GD0 );
@@ -79,13 +76,8 @@ _RealGD( itk::DataObject* image )
 
   // Connect output
   auto out = this->GetOutputData< cpPlugins::Interface::Image >( "Output" );
-  if( out != NULL )
-  {
-    out->SetITK< O >( filter->GetOutput( ) );
-    return( "" );
-  }
-  else
-    return( "BinaryErodeImageFilter: output not correctly created." );
+  out->SetITK( filter->GetOutput( ) );
+  return( "" );
 }
 
 // eof - $RCSfile$