[Insight-developers] gdcm patient orientation
Mathieu Malaterre
mathieu.malaterre at kitware.com
Tue Feb 21 11:13:15 EST 2006
Lorensen, William E (GE, Research) wrote:
> Mathieu,
>
> My dicom checker complains:
>
> (0x0020,0x0020) CS 4 [L\P] # Patient Orientation
> !! ERROR : Patient Position (0x0020,0x0020) must not be present
> !! if (0x0020, 0x0032) and (0x0020, 0x0037) are required
>
> In Table C.7-9 of the dicom standard:
>
> Patient direction of rows and columns of the image. Required if imkage does not require Image Orientation (Patient) (0020,0037) and Image Position (Patient) (0020,0032). See C.7.6.1.1.1 fr further explanation.
>
>
> I think gdcm should not be adding 0020|0020 if the others are present. However, this does not seem to affect processing on the A/W.
If I remove 0020|0020, David Clunie tools report:
./dciodvfy Image0075.dcm
...
Error - Missing attribute Type 2C Conditional
Element=<PatientOrientation> Module=<GeneralImage>
Mathieu
Index: gdcmFileHelper.cxx
===================================================================
RCS file: /cvsroot/Insight/Insight/Utilities/gdcm/src/gdcmFileHelper.cxx,v
retrieving revision 1.8
diff -u -3 -p -r1.8 gdcmFileHelper.cxx
--- gdcmFileHelper.cxx 20 Feb 2006 21:35:24 -0000 1.8
+++ gdcmFileHelper.cxx 21 Feb 2006 15:32:18 -0000
@@ -1639,12 +1639,12 @@ void FileHelper::CheckMandatoryElements(
// Patient Orientation
// Can be computed from (0020|0037) : Image Orientation (Patient)
- gdcm::Orientation o;
- std::string ori = o.GetOrientation ( FileInternal );
- if (ori != "\\" && ori != GDCM_UNFOUND)
- CheckMandatoryEntry(0x0020,0x0020,ori);
- else
- CheckMandatoryEntry(0x0020,0x0020,"");
+ //gdcm::Orientation o;
+ //std::string ori = o.GetOrientation ( FileInternal );
+ //if (ori != "\\" && ori != GDCM_UNFOUND)
+ // CheckMandatoryEntry(0x0020,0x0020,ori);
+ //else
+ // CheckMandatoryEntry(0x0020,0x0020,"");
// Modality : if missing we set it to 'OTher'
CheckMandatoryEntry(0x0008,0x0060,"OT");
More information about the Insight-developers
mailing list