From 5b3da07c167b4021a4f78218a849700af3b6b4d6 Mon Sep 17 00:00:00 2001 From: jpr Date: Tue, 20 Sep 2005 15:11:19 +0000 Subject: [PATCH] //DICOM PS 3-5 7.8.1 a) states that those //(gggg-0010->00FF where gggg is odd) attributes have to be LO --> Take it into account! --- src/gdcmDocument.cxx | 18 +++++++++++++----- src/gdcmOrientation.cxx | 6 +++--- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/gdcmDocument.cxx b/src/gdcmDocument.cxx index fdb6ab73..c916dcc6 100644 --- a/src/gdcmDocument.cxx +++ b/src/gdcmDocument.cxx @@ -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 ) { diff --git a/src/gdcmOrientation.cxx b/src/gdcmOrientation.cxx index 05f60e76..645e30cc 100644 --- a/src/gdcmOrientation.cxx +++ b/src/gdcmOrientation.cxx @@ -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) { -- 2.45.1