]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Plugins/IO/ImageReader.cxx
...
[cpPlugins.git] / lib / cpPlugins / Plugins / IO / ImageReader.cxx
index 66231c451e73042f85399dbcc6e714cc6fada814..900940bfcaf97c7a9d0e22149e1a56065d55b700 100644 (file)
@@ -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
   }