]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Plugins/BasicFilters/MedianImageFilter.cxx
...
[cpPlugins.git] / lib / cpPlugins / Plugins / BasicFilters / MedianImageFilter.cxx
index 2e4c763fd61ab6c9470300de7bb89d364e50c08f..0046f07e76abe73bdd10bd614fcfc636ffdd31f4 100644 (file)
@@ -8,7 +8,7 @@ cpPlugins::BasicFilters::MedianImageFilter::
 MedianImageFilter( )
   : Superclass( )
 {
-  this->_AddInput( "Input", true );
+  this->_AddInput( "Input" );
   this->_AddOutput< cpPlugins::Interface::Image >( "Output" );
 
   this->m_Parameters->ConfigureAsUint( "Radius" );
@@ -26,9 +26,6 @@ std::string cpPlugins::BasicFilters::MedianImageFilter::
 _GenerateData( )
 {
   auto image = this->GetInputData< cpPlugins::Interface::Image >( "Input" );
-  if( image == NULL )
-    return( "MedianImageFilter: No input image." );
-
   itk::DataObject* itk_image = NULL;
   std::string r = "";
   cpPlugins_Image_Demangle_AllScalarTypes( 2, image, itk_image, r, _GD0 );
@@ -70,13 +67,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( "MedianImageFilter: output not correctly created." );
+  out->SetITK( filter->GetOutput( ) );
+  return( "" );
 }
 
 // eof - $RCSfile$