]> Creatis software - gdcm.git/blobdiff - src/gdcmDocument.cxx
Port Mathieu's modif from gdcm1.2
[gdcm.git] / src / gdcmDocument.cxx
index d2991e701c874f6862f9ab85fb4bbd6e267ddc96..9ddb8a5739dd14ead91f8e00ad0fb713da913f23 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2006/04/11 16:03:26 $
-  Version:   $Revision: 1.346 $
+  Date:      $Date: 2006/05/12 09:37:45 $
+  Version:   $Revision: 1.348 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -1064,7 +1064,7 @@ void Document::ParseDES(DocEntrySet *set, long offset,
    if( Debug::GetDebugFlag() )   
       std::cout << std::dec <<"(long)(Fp->tellg()) " << (long)(Fp->tellg()) // in Debug mode
                 << std::hex << " 0x(" <<(long)(Fp->tellg()) <<  ")" << std::endl;
-*/   
+ */ 
  
    // if ( !delim_mode && ((long)(Fp->tellg())-offset) >= l_max) // Once per DocEntry   
       if ( !delim_mode ) // 'and then' doesn't exist in C++ :-(
@@ -1744,18 +1744,18 @@ void Document::FixDocEntryFoundLength(DocEntry *entry,
         gdcmErrorMacro( "This looks like to a buggy Siemens DICOM file."
         "The length of this tag seems to be wrong" );
       }
-   } 
+   }
+
    else if ( entry->GetVR() == "SQ" )
    {
-      foundLength = 0;      // ReadLength is unchanged 
-   } 
-    
-   //////// We encountered a 'delimiter' element i.e. a tag of the form 
+      foundLength = 0;      // ReadLength is unchanged
+   }
+
+   //////// We encountered a 'delimiter' element i.e. a tag of the form
    // "fffe|xxxx" which is just a marker. Delimiters length should not be
    // taken into account.
    else if ( gr == 0xfffe )
-   {    
+   {
      // According to the norm, fffe|0000 shouldn't exist. BUT the Philips
      // image gdcmData/gdcm-MR-PHILIPS-16-Multi-Seq.dcm happens to
      // causes extra troubles...
@@ -1767,7 +1767,7 @@ void Document::FixDocEntryFoundLength(DocEntry *entry,
      {
         foundLength=12; // to skip the mess that follows this bugged Tag !
      }
-   }                
+   }
    entry->SetLength(foundLength);
 }
 
@@ -1803,6 +1803,7 @@ bool Document::IsDocEntryAnInteger(DocEntry *entry)
          // encounter such an ill-formed image, we simply display a warning
          // message and proceed on parsing (while crossing fingers).
          long filePosition = Fp->tellg(); // Only when elem 0x0000 length is not 4 (?!?)
+         (void)filePosition;
          gdcmWarningMacro( "Erroneous Group Length element length  on : (" 
            << std::hex << group << " , " << elem
            << ") -before- position x(" << filePosition << ")"