]> Creatis software - gdcm.git/commitdiff
//DICOM PS 3-5 7.8.1 a) states that those
authorjpr <jpr>
Tue, 20 Sep 2005 15:11:19 +0000 (15:11 +0000)
committerjpr <jpr>
Tue, 20 Sep 2005 15:11:19 +0000 (15:11 +0000)
      //(gggg-0010->00FF where gggg is odd) attributes have to be LO

--> Take it into account!

src/gdcmDocument.cxx
src/gdcmOrientation.cxx

index fdb6ab7398d914730e32e974d50b7045fd350a34..c916dcc612584e6041273e3eb87148ab7d9e17bd 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/09/20 09:07:56 $
-  Version:   $Revision: 1.280 $
+  Date:      $Date: 2005/09/20 15:11:19 $
+  Version:   $Revision: 1.281 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -1691,7 +1691,7 @@ std::string Document::FindDocEntryVR()
  *            and the taken VR. If they are different, the header entry is 
  *            updated with the new VR.
  * @param     vr    Dicom Value Representation
- * @return    false if the VR is incorrect of if the VR isn't referenced
+ * @return    false if the VR is incorrect or if the VR isn't referenced
  *            otherwise, it returns true
 */
 bool Document::CheckDocEntryVR(VRKey vr)
@@ -2264,7 +2264,15 @@ DocEntry *Document::ReadNextDocEntry()
    if ( vr == GDCM_UNKNOWN )
    {
       if ( elem == 0x0000 ) // Group Length
+      {
          realVR = "UL";     // must be UL
+      }
+      else if (group%2 == 1 &&  (elem >= 0x0010 && elem <=0x00ff ))
+      {  
+      //DICOM PS 3-5 7.8.1 a) states that those 
+      //(gggg-0010->00FF where gggg is odd) attributes have to be LO
+         realVR= "LO";
+      }
       else
       {
          DictEntry *dictEntry = GetDictEntry(group,elem);
@@ -2279,9 +2287,9 @@ DocEntry *Document::ReadNextDocEntry()
    if ( Global::GetVR()->IsVROfSequence(realVR) )
       newEntry = NewSeqEntry(group, elem);
    else if ( Global::GetVR()->IsVROfStringRepresentable(realVR) )
-      newEntry = NewValEntry(group, elem,vr);
+      newEntry = NewValEntry(group, elem, vr);
    else
-      newEntry = NewBinEntry(group, elem,vr);
+      newEntry = NewBinEntry(group, elem, vr);
 
    if ( vr == GDCM_UNKNOWN )
    {
index 05f60e761bad7e22bfafbca4a637681000848ef4..645e30cce2e1c29cd422417501862ad1428841f6 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmOrientation.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/09/20 14:13:41 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2005/09/20 15:11:19 $
+  Version:   $Revision: 1.10 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -128,7 +128,7 @@ Res
 Orientation::VerfCriterion(int typeCriterion, double criterionNew, Res const &in)
 {
    Res res;
-   double type = in.first;
+//   double type = in.first;
    double criterion = in.second;
    if (/*criterionNew < 0.1 && */criterionNew < criterion)
    {