changeset 1848:e39716f71d67

new main dicom tags
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 01 Dec 2015 13:26:23 +0100
parents 559956d5ceb2
children 6394a2f8f1e1
files Core/DicomFormat/DicomMap.cpp Core/DicomFormat/DicomTag.h UnitTestsSources/DicomMapTests.cpp
diffstat 3 files changed, 41 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/Core/DicomFormat/DicomMap.cpp	Mon Nov 30 15:34:14 2015 +0100
+++ b/Core/DicomFormat/DicomMap.cpp	Tue Dec 01 13:26:23 2015 +0100
@@ -61,7 +61,11 @@
     DicomTag(0x0020, 0x0010),   // StudyID
     DICOM_TAG_STUDY_DESCRIPTION,
     DICOM_TAG_ACCESSION_NUMBER,
-    DICOM_TAG_STUDY_INSTANCE_UID
+    DICOM_TAG_STUDY_INSTANCE_UID,
+    DICOM_TAG_REQUESTED_PROCEDURE_DESCRIPTION,   // New in db v6
+    DICOM_TAG_INSTITUTION_NAME,                  // New in db v6
+    DICOM_TAG_REQUESTING_PHYSICIAN,              // New in db v6
+    DICOM_TAG_REFERRING_PHYSICIAN_NAME           // New in db v6
   };
 
   static DicomTag seriesTags[] =
@@ -83,8 +87,10 @@
     DICOM_TAG_NUMBER_OF_SLICES,
     DICOM_TAG_NUMBER_OF_TIME_SLICES,
     DICOM_TAG_SERIES_INSTANCE_UID,
-    DICOM_TAG_IMAGE_ORIENTATION_PATIENT,    // New in db v6
-    DICOM_TAG_SERIES_TYPE                   // New in db v6
+    DICOM_TAG_IMAGE_ORIENTATION_PATIENT,             // New in db v6
+    DICOM_TAG_SERIES_TYPE,                           // New in db v6
+    DICOM_TAG_OPERATOR_NAME,                         // New in db v6
+    DICOM_TAG_PERFORMED_PROCEDURE_STEP_DESCRIPTION   // New in db v6
   };
 
   static DicomTag instanceTags[] =
@@ -97,7 +103,8 @@
     DICOM_TAG_NUMBER_OF_FRAMES,
     DICOM_TAG_TEMPORAL_POSITION_IDENTIFIER,
     DICOM_TAG_SOP_INSTANCE_UID,
-    DICOM_TAG_IMAGE_POSITION_PATIENT    // New in db v6
+    DICOM_TAG_IMAGE_POSITION_PATIENT,    // New in db v6
+    DICOM_TAG_IMAGE_COMMENTS             // New in db v6
   };
 
 
@@ -297,6 +304,12 @@
     SetupFindTemplate(result, studyTags, sizeof(studyTags) / sizeof(DicomTag));
     result.SetValue(DICOM_TAG_ACCESSION_NUMBER, "");
     result.SetValue(DICOM_TAG_PATIENT_ID, "");
+
+    // These main DICOM tags are only indirectly related to the
+    // General Study Module, remove them
+    result.Remove(DICOM_TAG_INSTITUTION_NAME);
+    result.Remove(DICOM_TAG_REQUESTING_PHYSICIAN);
+    result.Remove(DICOM_TAG_REQUESTED_PROCEDURE_DESCRIPTION);
   }
 
   void DicomMap::SetupFindSeriesTemplate(DicomMap& result)
@@ -316,6 +329,7 @@
     result.Remove(DICOM_TAG_NUMBER_OF_TEMPORAL_POSITIONS);
     result.Remove(DICOM_TAG_NUMBER_OF_TIME_SLICES);
     result.Remove(DICOM_TAG_IMAGE_ORIENTATION_PATIENT);
+    result.Remove(DICOM_TAG_SERIES_TYPE);
   }
 
   void DicomMap::SetupFindInstanceTemplate(DicomMap& result)
--- a/Core/DicomFormat/DicomTag.h	Mon Nov 30 15:34:14 2015 +0100
+++ b/Core/DicomFormat/DicomTag.h	Tue Dec 01 13:26:23 2015 +0100
@@ -160,4 +160,12 @@
 
   // Various tags
   static const DicomTag DICOM_TAG_SERIES_TYPE(0x0054, 0x1000);
+  static const DicomTag DICOM_TAG_REQUESTED_PROCEDURE_DESCRIPTION(0x0032, 0x1060);
+  static const DicomTag DICOM_TAG_INSTITUTION_NAME(0x0008, 0x0080);
+  static const DicomTag DICOM_TAG_REQUESTING_PHYSICIAN(0x0032, 0x1032);
+  static const DicomTag DICOM_TAG_REFERRING_PHYSICIAN_NAME(0x0008, 0x0090);
+  static const DicomTag DICOM_TAG_OPERATOR_NAME(0x0008, 0x1070);
+  static const DicomTag DICOM_TAG_PERFORMED_PROCEDURE_STEP_DESCRIPTION(0x0040, 0x0254);
+  static const DicomTag DICOM_TAG_IMAGE_COMMENTS(0x0020, 0x4000);
+  
 }
--- a/UnitTestsSources/DicomMapTests.cpp	Mon Nov 30 15:34:14 2015 +0100
+++ b/UnitTestsSources/DicomMapTests.cpp	Tue Dec 01 13:26:23 2015 +0100
@@ -151,6 +151,9 @@
 static void TestModule(ResourceType level,
                        DicomModule module)
 {
+  // REFERENCE: DICOM PS3.3 2015c - Information Object Definitions
+  // http://dicom.nema.org/medical/dicom/current/output/html/part03.html
+
   std::set<DicomTag> moduleTags, main;
   DicomTag::AddTagsForModule(moduleTags, module);
   DicomMap::GetMainDicomTags(main, level);
@@ -160,21 +163,23 @@
   {
     bool ok = moduleTags.find(*it) != moduleTags.end();
 
-    // Exceptions for the Series level
-    /*if ((//
-          *it == DicomTag(0x, 0x) && 
-          level == ResourceType_Series))
+    // Exceptions for the Study level
+    if (level == ResourceType_Study &&
+        (*it == DicomTag(0x0008, 0x0080) ||  /* InstitutionName, from Visit identification module, related to Visit */
+         *it == DicomTag(0x0032, 0x1032) ||  /* RequestingPhysician, from Imaging Service Request module, related to Study */
+         *it == DicomTag(0x0032, 0x1060)))   /* RequestedProcedureDescription, from Requested Procedure module, related to Study */
     {
       ok = true;
-      }*/
+    }
 
     // Exceptions for the Instance level
     if (level == ResourceType_Instance &&
-        (*it == DicomTag(0x0020, 0x0012) ||  /* Accession number, from Image module */
-         *it == DicomTag(0x0054, 0x1330) ||  /* Image Index, from PET Image module */
-         *it == DicomTag(0x0020, 0x0100) ||  /* Temporal Position Identifier, from MR Image module */
-         *it == DicomTag(0x0028, 0x0008) ||  /* Number of Frames, from Multi-frame module attributes, related to Image IOD */
-         *it == DICOM_TAG_IMAGE_POSITION_PATIENT))
+        (*it == DicomTag(0x0020, 0x0012) ||  /* AccessionNumber, from General Image module */
+         *it == DicomTag(0x0054, 0x1330) ||  /* ImageIndex, from PET Image module */
+         *it == DicomTag(0x0020, 0x0100) ||  /* TemporalPositionIdentifier, from MR Image module */
+         *it == DicomTag(0x0028, 0x0008) ||  /* NumberOfFrames, from Multi-frame module attributes, related to Image */
+         *it == DicomTag(0x0020, 0x0032) ||  /* ImagePositionPatient, from Image Plan module, related to Image */
+         *it == DicomTag(0x0020, 0x4000)))   /* ImageComments, from General Image module */
     {
       ok = true;
     }