X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FPlugins%2FIO%2FImageReader.cxx;h=900940bfcaf97c7a9d0e22149e1a56065d55b700;hb=7e29f3aec097ba1bff1894fed6eb1094276c5b72;hp=66231c451e73042f85399dbcc6e714cc6fada814;hpb=dea0e89b762a27b1e4088f3d03b5169ca63a227f;p=cpPlugins.git diff --git a/lib/cpPlugins/Plugins/IO/ImageReader.cxx b/lib/cpPlugins/Plugins/IO/ImageReader.cxx index 66231c4..900940b 100644 --- a/lib/cpPlugins/Plugins/IO/ImageReader.cxx +++ b/lib/cpPlugins/Plugins/IO/ImageReader.cxx @@ -318,9 +318,6 @@ std::string cpPlugins::IO::ImageReader:: _RealGD( const TStringList& names ) { auto out = this->GetOutputData< cpPlugins::Interface::Image >( "Output" ); - if( out == NULL ) - return( "ImageReader: No output object properly created." ); - std::string r = ""; if( names.size( ) == 1 ) { @@ -331,12 +328,12 @@ _RealGD( const TStringList& names ) try { reader->Update( ); - out->SetITK< I >( reader->GetOutput( ) ); + out->SetITK( reader->GetOutput( ) ); } catch( itk::ExceptionObject& err ) { r = "ImageReader: " + std::string( err.GetDescription( ) ); - out->SetITK< I >( NULL ); + out->SetITK( NULL ); } // yrt } @@ -350,12 +347,12 @@ _RealGD( const TStringList& names ) try { reader->Update( ); - out->SetITK< I >( reader->GetOutput( ) ); + out->SetITK( reader->GetOutput( ) ); } catch( itk::ExceptionObject& err ) { r = "ImageReader: " + std::string( err.GetDescription( ) ); - out->SetITK< I >( NULL ); + out->SetITK( NULL ); } // yrt }