X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=appli%2Fexamples%2Fexample_OtsuFilter.cxx;h=21c7a7e2996a7ebbf6163e1865669a6cb18fbd3b;hb=a4bc3b8e36e91e45f37a3b7eecb5789c635aa5c0;hp=d076d5899fa93315d136d7f0c7277edf96fe9494;hpb=48412b66ce1d8d8831625f1a3f51f7e78825f9a1;p=cpPlugins.git diff --git a/appli/examples/example_OtsuFilter.cxx b/appli/examples/example_OtsuFilter.cxx index d076d58..21c7a7e 100644 --- a/appli/examples/example_OtsuFilter.cxx +++ b/appli/examples/example_OtsuFilter.cxx @@ -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" ); @@ -53,7 +54,6 @@ int main( int argc, char* argv[] ) otsu_params.SetValueAsUint( "NumberOfHistogramBins", 100 ); otsu_params.SetValueAsReal( "InsideValue", 255 ); otsu_params.SetValueAsReal( "OutsideValue", 0 ); - otsu_params.SetValueAsString( "OutputType", "uchar" ); otsu->SetParameters( otsu_params ); // Configure writer @@ -62,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( );