]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Plugins/BasicFilters/RGBImageToOtherChannelsFilter.cxx
...
[cpPlugins.git] / lib / cpPlugins / Plugins / BasicFilters / RGBImageToOtherChannelsFilter.cxx
index 13e6732abc1bd7410ffd31e00ccbc321b3294613..700043d032dc1f5920cc275fbc05fbc647f65e4f 100644 (file)
@@ -13,8 +13,8 @@ RGBImageToOtherChannelsFilter( )
 {
   typedef cpPlugins::Interface::Parameters TParameters;
 
-  this->_AddInput( "Input" );
-  this->_MakeOutput< cpPlugins::Interface::Image >( "Output" );
+  this->_AddInput( "Input", true );
+  this->_AddOutput< cpPlugins::Interface::Image >( "Output" );
 
   std::vector< std::string > choices;
   choices.push_back( "HSV" );
@@ -32,8 +32,7 @@ cpPlugins::BasicFilters::RGBImageToOtherChannelsFilter::
 std::string cpPlugins::BasicFilters::RGBImageToOtherChannelsFilter::
 _GenerateData( )
 {
-  cpPlugins::Interface::Image* image =
-    this->GetInput< cpPlugins::Interface::Image >( "Input" );
+  auto image = this->GetInputData< cpPlugins::Interface::Image >( "Input" );
   if( image == NULL )
     return( "RGBImageToOtherChannelsFilter: No input image." );
 
@@ -86,8 +85,7 @@ _RealGD( itk::DataObject* image )
   filter->Update( );
 
   // Connect output
-  cpPlugins::Interface::Image* out =
-    this->GetOutput< cpPlugins::Interface::Image >( "Output" );
+  auto out = this->GetOutputData< cpPlugins::Interface::Image >( "Output" );
   if( out != NULL )
   {
     out->SetITK< _O >( filter->GetOutput( ) );