]> Creatis software - gdcm.git/commitdiff
Comments
authorjpr <jpr>
Wed, 21 Sep 2005 16:53:59 +0000 (16:53 +0000)
committerjpr <jpr>
Wed, 21 Sep 2005 16:53:59 +0000 (16:53 +0000)
src/gdcmDocument.cxx
src/gdcmFile.cxx

index 5ebc0cb127b4806418b0090e40274eda6d11d6f0..e8c8ab0d69286a7379fbacd0bdb325fcf69865ec 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/09/21 09:42:19 $
-  Version:   $Revision: 1.282 $
+  Date:      $Date: 2005/09/21 16:53:59 $
+  Version:   $Revision: 1.283 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -1156,7 +1156,7 @@ void Document::ParseDES(DocEntrySet *set, long offset,
             if ( newDocEntry->GetGroup()%2 != 0 )
             {
                 Fp->seekg( l, std::ios::cur);
-                used = false;
+                //used = false; // never used
                 continue;  
             } 
          } 
@@ -1164,7 +1164,7 @@ void Document::ParseDES(DocEntrySet *set, long offset,
          {
            // User asked to skip *any* SeQuence
             Fp->seekg( l, std::ios::cur);
-            used = false;
+            //used = false; // never used
             continue;
          }
          // delay the dynamic cast as late as possible
@@ -1211,7 +1211,7 @@ void Document::ParseDES(DocEntrySet *set, long offset,
             used = false;
          }
  
-        if ( !delim_mode && ((long)(Fp->tellg())-offset) >= l_max)
+         if ( !delim_mode && ((long)(Fp->tellg())-offset) >= l_max)
          {
             if ( !used )
                delete newDocEntry;  
index 1fe7118d0212689afde55489598082f654143e6f..858dec827fc82bb2f15deedf5c097d97a6c88f95 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/09/20 09:07:56 $
-  Version:   $Revision: 1.269 $
+  Date:      $Date: 2005/09/21 16:53:59 $
+  Version:   $Revision: 1.270 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -754,9 +754,11 @@ float File::GetZOrigin()
 
 /**
   * \brief gets the info from 0020,0037 : Image Orientation Patient
+  *                   or from 0020 0035 : Image Orientation (RET)
   * (needed to organize DICOM files based on their x,y,z position)
   * @param iop adress of the (6)float array to receive values
-  * @return cosines of image orientation patient
+  * @return true when one of the tag is found
+  *         false when nothong is found
   */
 bool File::GetImageOrientationPatient( float iop[6] )
 {
@@ -770,7 +772,8 @@ bool File::GetImageOrientationPatient( float iop[6] )
       if ( sscanf( strImOriPat.c_str(), "%f \\ %f \\%f \\%f \\%f \\%f ", 
           &iop[0], &iop[1], &iop[2], &iop[3], &iop[4], &iop[5]) != 6 )
       {
-         gdcmWarningMacro( "Wrong Image Orientation Patient (0020,0037). Less than 6 values were found." );
+         gdcmWarningMacro( "Wrong Image Orientation Patient (0020,0037)."
+                        << " Less than 6 values were found." );
          return false;
       }
    }
@@ -781,13 +784,16 @@ bool File::GetImageOrientationPatient( float iop[6] )
       if ( sscanf( strImOriPat.c_str(), "%f \\ %f \\%f \\%f \\%f \\%f ", 
           &iop[0], &iop[1], &iop[2], &iop[3], &iop[4], &iop[5]) != 6 )
       {
-         gdcmWarningMacro( "wrong Image Orientation Patient (0020,0035). Less than 6 values were found." );
+         gdcmWarningMacro( "wrong Image Orientation Patient (0020,0035). "
+                        << "Less than 6 values were found." );
          return false;
       }
    }
    return true;
 }
 
+
+
 /**
  * \brief   Retrieve the number of Bits Stored (actually used)
  *          (as opposed to number of Bits Allocated)