From 798798c424a52ea234a92110a550f6dd4fa80ef4 Mon Sep 17 00:00:00 2001 From: jpr Date: Thu, 22 Sep 2005 14:41:24 +0000 Subject: [PATCH] Comments --- src/gdcmDocument.cxx | 10 ++++++---- src/gdcmOrientation.cxx | 30 ++++++++++++++++-------------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/src/gdcmDocument.cxx b/src/gdcmDocument.cxx index e8c8ab0d..1af57e73 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/21 16:53:59 $ - Version: $Revision: 1.283 $ + Date: $Date: 2005/09/22 14:41:24 $ + Version: $Revision: 1.284 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -1109,8 +1109,8 @@ void Document::ParseDES(DocEntrySet *set, long offset, { lgrGroup = atoi(strLgrGroup.c_str()); Fp->seekg(lgrGroup, std::ios::cur); - used = false; - RemoveEntry( newDocEntry ); + //used = false; // never used + RemoveEntry( newDocEntry ); // Remove and delete // bcc 5.5 is right "assigned a value that's never used" // newDocEntry = 0; continue; @@ -1156,6 +1156,7 @@ void Document::ParseDES(DocEntrySet *set, long offset, if ( newDocEntry->GetGroup()%2 != 0 ) { Fp->seekg( l, std::ios::cur); + RemoveEntry( newDocEntry ); // Remove and delete //used = false; // never used continue; } @@ -1165,6 +1166,7 @@ void Document::ParseDES(DocEntrySet *set, long offset, // User asked to skip *any* SeQuence Fp->seekg( l, std::ios::cur); //used = false; // never used + RemoveEntry( newDocEntry ); // Remove and delete continue; } // delay the dynamic cast as late as possible diff --git a/src/gdcmOrientation.cxx b/src/gdcmOrientation.cxx index 26f70d7a..2b2773a3 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/21 16:39:53 $ - Version: $Revision: 1.11 $ + Date: $Date: 2005/09/22 14:41:25 $ + Version: $Revision: 1.12 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -354,13 +354,13 @@ says : A question that is frequently asked in comp.protocols.dicom is how to determine which side of an image is which (e.g. left, right) and so on. - The short answer is that for projection radiographs this is specified - explicitly using the Patient Orientation attribute, and for cross-sectional - images it needs to be derived from the Image Orientation (Patient) direction + The short answer is that for projection radiographs this is specified + explicitly using the "Patient Orientation" attribute, and for cross-sectional + images it needs to be derived from the "Image Orientation (Patient)" direction cosines. In the standard these are explained as follows: * "C.7.6.1.1.1 Patient Orientation. - The Patient Orientation (0020,0020) relative to the image + The Patient Orientation (0020,0020) relative to the image plane shall be specified by two values that designate the anatomical direction of the positive row axis (left to right) and the positive column axis (top to bottom). @@ -382,18 +382,19 @@ A question that is frequently asked in comp.protocols.dicom is how to determine principal orientation designated in the first character." * "C.7.6.2.1.1 Image Position And Image Orientation. - The Image Position (0020,0032) specifies the x, y, and z - coordinates of the upper left hand corner of the image; + The "Image Position (Patient)" (0020,0032) specifies the x, y, + and z coordinates of the upper left hand corner of the image; it is the center of the first voxel transmitted. - Image Orientation (0020,0037) specifies the direction - cosines of the first row and the first column with respect to - the patient. These Attributes shall be provided as a pair. + The "Image Orientation (Patient)" (0020,0037) specifies the + direction cosines of the first row and the first column + with respect to the patient. + These Attributes shall be provided as a pair. Row value for the x, y, and z axes respectively followed by the Column value for the x, y, and z axes respectively. The direction of the axes is defined fully by the patient's orientation. - The x-axis is increasing to the left hand sid of the patient. - The y-axis is increasing to the posterior side of the patient + The x-axis is increasing to the left hand side of the patient. + The y-axis is increasing to the posterior side of the patient. The z-axis is increasing toward the head of the patient. The patient based coordinate system is a right handed system, i.e. the vector cross product of a unit vector along the @@ -421,7 +422,8 @@ have multiple letters in as described under "refinements" in C.7.6.1.1.1): * letters: A (anterior), P (posterior), R (right),L (left), * H (head), F (foot). * Refinements in the orientation descriptions are designated - * by one or two additional letters in each value. + * by one or two additional letters in each value. + * Use it when "Patient Orientation" (0020,0020) is not found * @return orientation string as "rawOrientation\columnsOrientation" */ std::string Orientation::GetOrientation ( File *f ) -- 2.45.1