changeset 1843:251d7f7a6c4e

New configuration option "DownloadDicomDir" in Stone Web viewer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 24 Jun 2021 14:30:00 +0200
parents 9568082ee013
children 58049bdebdc3
files Applications/StoneWebViewer/NEWS Applications/StoneWebViewer/WebApplication/app.js Applications/StoneWebViewer/WebApplication/configuration.json
diffstat 3 files changed, 20 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Applications/StoneWebViewer/NEWS	Thu Jun 24 14:19:36 2021 +0200
+++ b/Applications/StoneWebViewer/NEWS	Thu Jun 24 14:30:00 2021 +0200
@@ -1,6 +1,8 @@
 Pending changes in the mainline
 ===============================
 
+* New configuration option "DownloadDicomDir" to download archives
+  containing DICOMDIR instead of a human-readable hierarchy of folders
 * If available, use ZIP streaming from Orthanc >= 1.9.4 to create archives
 
 
--- a/Applications/StoneWebViewer/WebApplication/app.js	Thu Jun 24 14:19:36 2021 +0200
+++ b/Applications/StoneWebViewer/WebApplication/app.js	Thu Jun 24 14:30:00 2021 +0200
@@ -401,7 +401,7 @@
       creatingArchive: false,
       archiveJob: '',
       mouseTool: 0,
-      orthancSystem: {},  // Only available if "DicomWebRoot" configuration option is set
+      orthancSystem: {},  // Only available if "OrthancApiRoot" configuration option is set
       stoneWebViewerVersion: '...',
       emscriptenVersion: '...',
 
@@ -1011,7 +1011,13 @@
           }
           else {
             var orthancId = response.data[0]['ID'];
-            var uri = that.globalConfiguration.OrthancApiRoot + '/studies/' + orthancId + '/archive';
+            
+            var uri = that.globalConfiguration.OrthancApiRoot + '/studies/' + orthancId;
+            if (that.globalConfiguration.DownloadDicomDir === true) {
+              uri = uri + '/media';
+            } else {
+              uri = uri + '/archive';
+            }
 
             if (that.orthancSystem.ApiVersion >= 13) {
               // ZIP streaming is available (this is Orthanc >=
--- a/Applications/StoneWebViewer/WebApplication/configuration.json	Thu Jun 24 14:19:36 2021 +0200
+++ b/Applications/StoneWebViewer/WebApplication/configuration.json	Thu Jun 24 14:30:00 2021 +0200
@@ -89,6 +89,15 @@
      * (download of studies, and playing videos). This option is
      * typically used by the developers of Stone.
      **/
-    "OrthancApiRoot" : ".."
+    "OrthancApiRoot" : "..",
+
+    /**
+     * If this option is set to "true", the Stone Web viewer will
+     * create DICOMDIR media archives (as generated by the route
+     * "/studies/{id}/media" of Orthanc), instead of archives
+     * containing a human-readable hierarchy of folders (as generated
+     * by the route "/studies/{id}/archive").
+     **/
+    "DownloadDicomDir" : false
   }
 }