diff Applications/StoneWebViewer/WebApplication/app.js @ 1947:31fd7aba48ca

Support of DICOM images without the Study Date (0008,0020) tag
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 15 Jul 2022 14:35:05 +0200
parents 05f0327d26c8
children d3ae6858e77b
line wrap: on
line diff
--- a/Applications/StoneWebViewer/WebApplication/app.js	Thu Jun 02 21:22:24 2022 +0200
+++ b/Applications/StoneWebViewer/WebApplication/app.js	Fri Jul 15 14:35:05 2022 +0200
@@ -568,7 +568,15 @@
       }
     },
 
-    SetResources: function(sourceStudies, sourceSeries) {     
+    SetResources: function(sourceStudies, sourceSeries) {
+      // Here one can fix input studies/series for missing DICOM tags
+      // that are needed for the Stone Web viewer (e.g. "hand.dcm")
+      for (var i = 0; i < sourceStudies.length; i++) {
+        if (!(STUDY_DATE in sourceStudies[i])) {
+          sourceStudies[i][STUDY_DATE] = '';
+        }
+      }
+
       var indexStudies = {};
 
       var studies = [];