changeset 38:2cefaf5b3c2e

improvements
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 30 Aug 2012 14:35:13 +0200
parents 88f537ca35a5
children 741efcd39682
files Core/DicomFormat/DicomMap.cpp PalantirExplorer/explorer.js
diffstat 2 files changed, 47 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/Core/DicomFormat/DicomMap.cpp	Thu Aug 30 12:45:17 2012 +0200
+++ b/Core/DicomFormat/DicomMap.cpp	Thu Aug 30 14:35:13 2012 +0200
@@ -30,25 +30,25 @@
 {
   static DicomTag patientTags[] =
   {
-    DicomTag(0x0008, 0x0050), // AccessionNumber
     DicomTag(0x0010, 0x0010), // PatientName
     DicomTag(0x0010, 0x0020), // PatientID
     DicomTag(0x0010, 0x0030), // PatientBirthDate
     DicomTag(0x0010, 0x0040), // PatientSex
-    DicomTag(0x0010, 0x1000), // OtherPatientIDs
-    DicomTag(0x0010, 0x1010), // PatientAge
-    DicomTag(0x0010, 0x1040)  // PatientAddress
+    DicomTag(0x0010, 0x1000)  // OtherPatientIDs
+    //DicomTag(0x0010, 0x1010), // PatientAge
+    //DicomTag(0x0010, 0x1040)  // PatientAddress
   };
 
   static DicomTag studyTags[] =
   {
     DicomTag(0x0008, 0x0020), // StudyDate
     DicomTag(0x0008, 0x0030), // StudyTime
+    DicomTag(0x0008, 0x0050), // AccessionNumber
     DicomTag(0x0008, 0x1030), // StudyDescription
     DicomTag(0x0020, 0x000d), // StudyInstanceUID
-    DicomTag(0x0020, 0x0010), // StudyID
-    DicomTag(0x0010, 0x1020), // PatientSize
-    DicomTag(0x0010, 0x1030)  // PatientWeight
+    DicomTag(0x0020, 0x0010)  // StudyID
+    //DicomTag(0x0010, 0x1020), // PatientSize
+    //DicomTag(0x0010, 0x1030)  // PatientWeight
   };
 
   static DicomTag seriesTags[] =
@@ -59,7 +59,8 @@
     DicomTag(0x0008, 0x0070), // Manufacturer
     DicomTag(0x0008, 0x1010), // StationName
     DicomTag(0x0008, 0x103e), // SeriesDescription
-    DicomTag(0x0010, 0x1080), // MilitaryRank
+    //DicomTag(0x0010, 0x1080), // MilitaryRank
+    DicomTag(0x0018, 0x0015), // BodyPartExamined
     DicomTag(0x0018, 0x0024), // SequenceName
     DicomTag(0x0018, 0x1030), // ProtocolName
     DicomTag(0x0020, 0x000e), // SeriesInstanceUID
--- a/PalantirExplorer/explorer.js	Thu Aug 30 12:45:17 2012 +0200
+++ b/PalantirExplorer/explorer.js	Thu Aug 30 14:35:13 2012 +0200
@@ -197,18 +197,44 @@
 }
 
 
+function FormatMainDicomTags(tags, tagsToIgnore)
+{
+  var s = '';
+
+  for (var i in tags)
+  {
+    if (tagsToIgnore.indexOf(i) == -1)
+    {
+      var v = tags[i];
+
+      if (v == "PatientBirthDate")
+      {
+        v = FormatDicomDate(v);
+      }
+      else if (v == "DicomStudyInstanceUID")
+      {
+        v = SplitLongUid(v);
+      }
+      
+
+      s += ('<p>{0}: <strong>{1}</strong></p>').format(i, v);
+    }
+  }
+
+  return s;
+}
+
 
 function FormatPatient(patient, link, isReverse)
 {
-  var s = ('<h3>{1}</h3>' + 
-           '<p>Patient ID: <strong>{2}</strong></p>' +
-           '<p>Accession Number: <strong>{3}</strong></p>' +
-           '<p>Date of Birth: <strong>{4}</strong></p>' +
-           '<p>Sex: <strong>{5}</strong></p>' +
-           '<span class="ui-li-count">{6}</span>'
+  var s = ('<h3>{0}</h3>' + 
+           '<p>Patient ID: <strong>{1}</strong></p>' +
+           '<p>Accession aaNumber: <strong>{2}</strong></p>' +
+           '<p>Date of Birth: <strong>{3}</strong></p>' +
+           '<p>Sex: <strong>{4}</strong></p>' +
+           '<span class="ui-li-count">{5}</span>'
           ).format
-  (link,
-   patient.MainDicomTags.PatientName,
+  (patient.MainDicomTags.PatientName,
    patient.DicomPatientID,
    patient.MainDicomTags.AccessionNumber,
    FormatDicomDate(patient.MainDicomTags.PatientBirthDate),
@@ -224,11 +250,13 @@
 function FormatStudy(study, link, isReverse)
 {
   var s = ('<h3>{0}</h3>' +
-           '<p>Study Instance UID: <strong>{1}</strong></p>' +
+           //'<p>Study Instance UID: <strong>{1}</strong></p>' +
+           '{1}' +
            '<span class="ui-li-count">{2}</span>'
            ).format
   (study.MainDicomTags.StudyDescription,
-   SplitLongUid(study.DicomStudyInstanceUID),
+   //SplitLongUid(study.DicomStudyInstanceUID),
+   FormatMainDicomTags(study.MainDicomTags, [ "StudyDescription", "StudyTime" ]),
    study.Series.length
   );