]> Creatis software - cpPlugins.git/blobdiff - appli/examples/example_OtsuFilter.cxx
...
[cpPlugins.git] / appli / examples / example_OtsuFilter.cxx
index 9f91835cfbff2ad65712d494fa86fa0523e3490a..21c7a7e2996a7ebbf6163e1865669a6cb18fbd3b 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, otsu;
   reader = plugins.CreateProcessObject( "cpPlugins::ImageReader" );
@@ -61,8 +62,8 @@ int main( int argc, char* argv[] )
   writer->SetParameters( writer_params );
 
   // Connect pipeline
-  otsu->SetInput( 0, reader->GetOutput( 0 ) );
-  writer->SetInput( 0, otsu->GetOutput( 0 ) );
+  otsu->SetInput( 0, reader->GetOutput< TDataObject >( 0 ) );
+  writer->SetInput( 0, otsu->GetOutput< TDataObject >( 0 ) );
 
   // Execute pipeline
   std::string err = writer->Update( );