]> Creatis software - cpPlugins.git/blobdiff - appli/examples/example_RGBImageToHSVChannels.cxx
...
[cpPlugins.git] / appli / examples / example_RGBImageToHSVChannels.cxx
index 03d0eea05ff47583f445fa521681b523f9de02ac..57d0581ad4ad3a4b165a197c5557079de3c12368 100644 (file)
@@ -30,6 +30,7 @@ int main( int argc, char* argv[] )
 
   // Create objects
   typedef cpPlugins::Interface::ProcessObject TProcessObject;
+  typedef cpPlugins::Interface::DataObject    TDataObject;
   typedef cpPlugins::Interface::Parameters    TParameters;
   cpPlugins::Interface::ProcessObject::Pointer reader, writer, filter;
   reader = plugins.CreateProcessObject( "cpPlugins::ImageReader" );
@@ -59,8 +60,8 @@ int main( int argc, char* argv[] )
   writer->SetParameters( writer_params );
 
   // Connect pipeline
-  filter->SetInput( 0, reader->GetOutput( 0 ) );
-  writer->SetInput( 0, filter->GetOutput( 0 ) );
+  filter->SetInput( 0, reader->GetOutput< TDataObject >( 0 ) );
+  writer->SetInput( 0, filter->GetOutput< TDataObject >( 0 ) );
 
   // Execute pipeline
   std::string err = writer->Update( );