diff Core/DicomFormat/DicomTag.cpp @ 291:4d7469f72a0b

embedding of dicom dictionaries
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 14 Dec 2012 15:15:48 +0100
parents fe180eae201d
children bdd72233b105
line wrap: on
line diff
--- a/Core/DicomFormat/DicomTag.cpp	Fri Dec 14 11:24:24 2012 +0100
+++ b/Core/DicomFormat/DicomTag.cpp	Fri Dec 14 15:15:48 2012 +0100
@@ -70,4 +70,49 @@
     sprintf(b, "%04x,%04x", group_, element_);
     return std::string(b);
   }
+
+
+  const char* DicomTag::GetMainTagsName() const
+  {
+    if (*this == DICOM_TAG_ACCESSION_NUMBER)
+      return "AccessionNumber";
+
+    if (*this == DICOM_TAG_SOP_INSTANCE_UID)
+      return "SOPInstanceUID";
+
+    if (*this == DICOM_TAG_PATIENT_ID)
+      return "PatientID";
+
+    if (*this == DICOM_TAG_SERIES_INSTANCE_UID)
+      return "SeriesInstanceUID";
+
+    if (*this == DICOM_TAG_STUDY_INSTANCE_UID)
+      return "StudyInstanceUID"; 
+
+    if (*this == DICOM_TAG_PIXEL_DATA)
+      return "PixelData";
+
+    if (*this == DICOM_TAG_IMAGE_INDEX)
+      return "ImageIndex";
+
+    if (*this == DICOM_TAG_INSTANCE_NUMBER)
+      return "InstanceNumber";
+
+    if (*this == DICOM_TAG_NUMBER_OF_SLICES)
+      return "NumberOfSlices";
+
+    if (*this == DICOM_TAG_NUMBER_OF_FRAMES)
+      return "NumberOfFrames";
+
+    if (*this == DICOM_TAG_CARDIAC_NUMBER_OF_IMAGES)
+      return "CardiacNumberOfImages";
+
+    if (*this == DICOM_TAG_IMAGES_IN_ACQUISITION)
+      return "ImagesInAcquisition";
+
+    if (*this == DICOM_TAG_PATIENT_NAME)
+      return "PatientName";
+
+    return "";
+  }
 }