]> Creatis software - gdcm.git/commitdiff
Now gdcmFile::Load() returns false if file is not gdcm parsable
authorjpr <jpr>
Wed, 6 Jul 2005 11:01:08 +0000 (11:01 +0000)
committerjpr <jpr>
Wed, 6 Jul 2005 11:01:08 +0000 (11:01 +0000)
Only gdcmDocument::Load() did it, before.
Thx to Benoit for reporting bug

src/gdcmFile.cxx

index b33765ad47eab787f9cc6d1374ce7727fc857b09..16b7796e60e22bf1f434f4a927b63fb3111894de 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/07/02 18:09:36 $
-  Version:   $Revision: 1.246 $
+  Date:      $Date: 2005/07/06 11:01:08 $
+  Version:   $Revision: 1.247 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -95,7 +95,8 @@ File::~File ()
  */
 bool File::Load( std::string const &fileName ) 
 {
-   this->Document::Load( fileName );
+   if ( ! this->Document::Load( fileName ) )
+      return false;
 
    // for some ACR-NEMA images GrPixel, NumPixel is *not* 7fe0,0010
    // We may encounter the 'RETired' (0x0028, 0x0200) tag