]> Creatis software - gdcm.git/commitdiff
Improve Print method
authorjpr <jpr>
Tue, 6 Sep 2005 15:34:29 +0000 (15:34 +0000)
committerjpr <jpr>
Tue, 6 Sep 2005 15:34:29 +0000 (15:34 +0000)
src/gdcmFileHelper.cxx

index 7e0a018cff474bb4091997d8a5e89615610d8876..67274d990ce8536f1f859a740ef47d491c532edc 100644 (file)
@@ -4,8 +4,8 @@
   Module:    $RCSfile: gdcmFileHelper.cxx,v $
   Language:  C++
 
-  Date:      $Date: 2005/08/30 15:36:18 $
-  Version:   $Revision: 1.56 $
+  Date:      $Date: 2005/09/06 15:34:29 $
+  Version:   $Revision: 1.57 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -1591,8 +1591,11 @@ void FileHelper::Print(std::ostream &os, std::string const &)
    FileInternal->SetPrintLevel(PrintLevel);
    FileInternal->Print(os);
 
-   PixelReadConverter->SetPrintLevel(PrintLevel);
-   PixelReadConverter->Print(os);
+   if ( FileInternal->IsReadable() )
+   {
+      PixelReadConverter->SetPrintLevel(PrintLevel);
+      PixelReadConverter->Print(os);
+   }
 }
 
 //-----------------------------------------------------------------------------