Mercurial > hg > orthanc-webviewer
changeset 185:3e45f3752074
Fix download of DICOM instance from the toolbox
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 13 Mar 2018 10:24:38 +0100 |
parents | 59c6ea40fe4f |
children | ab66a6baf2ae |
files | NEWS WebApplication/viewer.js |
diffstat | 2 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/NEWS Fri Jan 05 16:39:45 2018 +0100 +++ b/NEWS Tue Mar 13 10:24:38 2018 +0100 @@ -1,6 +1,7 @@ Pending changes in the mainline =============================== +* Fix download of DICOM instance from the toolbox * Fix for Osimis issue WVB-319: Some images are not loading in US_MF * Support of rendering RGB48 lookup tables (palette), if Orthanc SDK >= 1.3.1 * Support of OpenBSD
--- a/WebApplication/viewer.js Fri Jan 05 16:39:45 2018 +0100 +++ b/WebApplication/viewer.js Tue Mar 13 10:24:38 2018 +0100 @@ -161,7 +161,15 @@ iframe.style.display = 'none'; document.body.appendChild(iframe); } - iframe.src = '../../instances/' + instance + '/file'; + + var id = instance; + var pos = instance.indexOf('_'); + if (pos != -1) { + // Remove the frame index (after the underscore) + id = id.substring(0, pos); + } + + iframe.src = '../../instances/' + id + '/file'; }