Compilation of Orthanc StoneWebViewer into Docker

Hello,

I am trying to dockerize Orthanc and Orthanc StoneWebViewer. I used the GitHub repo of https://github.com/jodogne/OrthancDocker (thanks to Sebastian) and successfully compile all the plugins except StoneWebViewer. I need to translate the buttons in the stonewebviewer and remove some buttons like “download as jpg”. It is not difficult to change this in the html and js files but I have a difficulty to embed those changes into the plugin. I could not find those wasm-binaries (like https://demo.orthanc-server.com/stone-webviewer/stone.js) in the container file.

Thanks…
Hasan Erken

You might want to look at this post. It is possible to host the front-end for the StoneViewer on your own server, so it might be easier to do that initially while developing.

https://groups.google.com/g/orthanc-users/c/4rvJB3Gy4wc/m/D8_Lrm_LAQAJ

"Le jeudi 3 décembre 2020 à 18:45:31 UTC+1, s.jo...@gmail.com a écrit :

Hi Salim,

They can be found here (“wasm-binaries.zip”):
https://lsb.orthanc-server.com/stone-webviewer/1.0/

Sébastien-"

Thanks for such a quick response and this amazing Orthanc ecosystem. I will try to do it.

Best, Hasan

13 Mayıs 2021 Perşembe tarihinde saat 18:44:25 UTC+3 itibarıyla stephen....@gmail.com şunları yazdı:

I have set up orthanc and wasm-binaries behind the nginx in the docker.

server {
listen 8080 default_server;

location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}

location /orthanc/ {
rewrite /orthanc(.) $1 break;
proxy_pass http://orthanc:8042;
proxy_set_header HOST $host;
proxy_set_header X-Real-IP $remote_addr;
rewrite /orthanc(.
) $1 break;
add_header ‘Access-Control-Allow-Credentials’ ‘true’;
add_header ‘Access-Control-Allow-Headers’ ‘DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type’;
add_header ‘Access-Control-Allow-Methods’ ‘GET, POST, OPTIONS’;
add_header ‘Access-Control-Allow-Origin’ ‘*’;
}

}

When I request the study like this
http://localhost:8080/index.html?study=1.2.40.0.13.20201113010648.15505535

I got the error of Ekran Resmi 2021-05-15 14.59.05.png

I could not solve the problem? I changed the configuration settings of web stone viewer, but it does not work.

Thanks…
Hasan ERKEN

13 Mayıs 2021 Perşembe tarihinde saat 18:50:42 UTC+3 itibarıyla Hasan Erken şunları yazdı:

Couple of things:

  1. NGINX I think does not come with the application/wasm wasm; MIME type configured. That lives in /etc/nginx/mime.types in Docker usually. That is just really annoying though, if you are going to serve the wasm from behind the proxy. The browser complains and falls back to ArrayBuffer.

  2. In app.js at the beginning there is: var CONFIGURATION_SOURCE = ‘configuration.json’; At the end of app.js it loads both WASM and the config file using axios. You can sort of handle that how you want (i.e. load from the server or from localhost), but you’ll need to tweak some of the setting there to get it to work. Probably need to adjust your DicomWebRoot & OrthancApiRoot.
    “StoneWebViewer” : {

“ExpectedMessageOrigin” : “”,

“DicomWebRoot” : “http(s)://locahost:8080/orthanc/dicom-web”,

“DicomCacheSize” : 128,

“OrthancApiRoot” : “???”

Stephen D. Scotti, M.D.