]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Plugins/BasicFilters/MedianImageFilter.cxx
Widget integration (step 6/6): Interactive architecture finished. Needs to be tested...
[cpPlugins.git] / lib / cpPlugins / Plugins / BasicFilters / MedianImageFilter.cxx
index d1205e728cdce5794e032f607380bc855a50760c..d47b50016c5706d352cd279f4369cc07dafb7307 100644 (file)
@@ -8,9 +8,8 @@ cpPlugins::BasicFilters::MedianImageFilter::
 MedianImageFilter( )
   : Superclass( )
 {
-  this->SetNumberOfInputs( 1 );
-  this->SetNumberOfOutputs( 1 );
-  this->_MakeOutput< cpPlugins::Interface::Image >( 0 );
+  this->_AddInput( "Input" );
+  this->_MakeOutput< cpPlugins::Interface::Image >( "Output" );
 
   this->m_Parameters->ConfigureAsUint( "Radius", 3 );
 }
@@ -26,7 +25,7 @@ std::string cpPlugins::BasicFilters::MedianImageFilter::
 _GenerateData( )
 {
   cpPlugins::Interface::Image* image =
-    this->GetInput< cpPlugins::Interface::Image >( 0 );
+    this->GetInput< cpPlugins::Interface::Image >( "Input" );
   if( image == NULL )
     return( "MedianImageFilter: No input image." );
 
@@ -71,7 +70,7 @@ _RealGD( itk::DataObject* image )
 
   // Connect output
   cpPlugins::Interface::Image* out =
-    this->GetOutput< cpPlugins::Interface::Image >( 0 );
+    this->GetOutput< cpPlugins::Interface::Image >( "Output" );
   if( out != NULL )
   {
     out->SetITK< O >( filter->GetOutput( ) );