Weasis

Dear All,

I am trying to launch Weasis from my web application. Mimicking an example given in the Weasis web site accessing Orthanc studies via dicom-web.

I tried via reverse proxy and directly but could not get the studies displayed.

Getting error in Verbose

Unsupported return MIME type: text/html, image/gif, image/jpeg, *; q=.2, /; q=.2, will return DICOM+JSON

Any idea what could be the issue?

I have attached verbose.

Orthanc.log (37.7 KB)

Hi

Looks like the QIDO-RS request has an “Accept” HTTP Header set to “text/html, image/gif, image/jpeg, *; q=.2, /; q=.2” while it should be "application/json

e.g with curl commands:

The reported accept header looks like the ones set by a browser while Orthanc shall be contacted by Weasis HTTP client that should set the Accept Header correctly. I would suggest that you get in touch with the Weasis support to get more information…

HTH,

Alain

Dear Alain,

Thank you so much for the response.

Kindly note I have attached a sample html page. It has an tag to launch sample patient directly from Orthanc-Server on my local Weasis. This works flawless. If I replace href attribute to my localhost (reverse proxy) then I was hoping that it would work as well but it does not. This means either my nginx configuration could be incorrect or my Orthanc configuration is missing something since Orthanc Web Server sample provided by Weasis works.

Any advise please?

Please note I have attached nginx configuration and Orthanc configuration.

Thank you again!!

nginx.conf (1.2 KB)

orthanc.json (38.7 KB)

Test.html (773 Bytes)

dicomweb.json (662 Bytes)

Hello! Here is my configuration to work with Weasis. Hope it works for you.

Weasis DICOM node:
weasis.png

Simplified nginx.conf file (dockerized NGINX, 2 load balanced Orthanc reader instances)

worker_processes auto;

events {
worker_connections 1024;
}

http {
resolver 127.0.0.11 ipv6=off;
include mime.types;
default_type application/octet-stream;

sendfile on;
keepalive_timeout 65;

tcp_nopush on;
tcp_nodelay on;
types_hash_max_size 2048;

upstream readerOrthancsNightly {
least_conn;
server orthanc-reader-nightly-1;
server orthanc-reader-nightly-2;
}

server {
listen 80;
server_name localhost;

gzip on;
gzip_comp_level 5;
gzip_min_length 1000;
gzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/json application/xml application/rss+xml font/truetype font/opentype application/vnd.ms-fontobject image/svg+xml;
gzip_proxied no-cache no-store private expired auth;
client_max_body_size 50M;

location /orthanc-nightly-reader {
proxy_pass http://readerOrthancsNightly;
proxy_set_header HOST $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
rewrite /orthanc-nightly-reader(.*) $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’ ‘*’;
proxy_read_timeout 600s;
proxy_connect_timeout 600s;
}
}
}

DicomWeb configuration:

“DicomWeb”: {
“Enable”: true, // Whether DICOMweb support is enabled
“Root”: “/dicom-web/”, // Root URI of the DICOMweb API (for QIDO-RS, STOW-RS and WADO-RS)
“EnableWado”: true, // Whether WADO-URI (previously known as WADO) support is enabled
“WadoRoot”: “/wado”, // Root URI of the WADO-URI (aka. WADO) API
“StudiesMetadata”: “MainDicomTags”,
“PublicRoot”: “/###PUBLIC_ROOT###/dicom-web/”,
“Ssl”: ###DICOM_WEB_SSL###,
“QidoCaseSensitive”: false // For QIDO-RS server, whether search is case sensitive (since release 0.5)
},

Since you are behind NGINX, I guess you will need PublicRoot set (see https://groups.google.com/g/orthanc-users/c/Z-GYyBiBHp4/m/85gKyDyvBAAJ). In my case, the “###???###” values are replaced at build time with Docker.

A segunda-feira, 27 de junho de 2022 à(s) 14:56:03 UTC+1, Ric Smi escreveu:

Hello Diego,

Thank you so much for your help! I followed your post and now I have a working Weasis with Othanc.

Thank you Alain for your assistance.

Best regards,