# HG changeset patch # User Sebastien Jodogne # Date 1624537800 -7200 # Node ID 251d7f7a6c4ee5b9b0b277fdde3455adf2954ead # Parent 9568082ee01313af30fafc01ce4624511835d048 New configuration option "DownloadDicomDir" in Stone Web viewer diff -r 9568082ee013 -r 251d7f7a6c4e Applications/StoneWebViewer/NEWS --- 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 diff -r 9568082ee013 -r 251d7f7a6c4e Applications/StoneWebViewer/WebApplication/app.js --- 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 >= diff -r 9568082ee013 -r 251d7f7a6c4e Applications/StoneWebViewer/WebApplication/configuration.json --- 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 } }