Appreciated the OHIF plugin but throughout the documentation I have not been able to find a straightforward baseline example of how to use it. Hence I’d like to raise my question here.
From what I read if I use the plugin, then I do not need a standalone OHIF viewer container, therefore no need for a separate ohif path setup to OHIF on the nginx proxy, according to the sporadic comments here. Is that correct assumption?
With that assumption, I have my orthanc configured as such (I just want a baseline to start with so no authentication, no token, etc):
...
"OrthancExplorer2": {
...
"UiOptions": {
...
"EnableOpenInOhifViewer3": true,
"OhifViewer3PublicRoot": "https://my.site.com/orthanc/ohif/"
}
},
"DicomWeb" : {
"Enable" : true,
"EnableWado" : true,
"Ssl" : false,
"Root": "/orthanc/dicom-web/",
"PublicRoot": "/orthanc/dicom-web/"
},
"OHIF": {
"DataSource" : "dicom-web",
"UserConfiguration" : "/etc/orthanc/ohif.js",
"RouterBasename" : "/orthanc/ohif/"
},
"Plugins": [
...
"/usr/share/orthanc/plugins-available/libOrthancOHIF.so"
]
The example configuration uses relative path for UserConfiguration
value but I realized it has to be absolute path…
The content of ohif.js
I’m trying to use is minimal, following this snippet:
window.config = {
extensions: [],
modes: []
}
The docker compose passes environment variables:
OHIF_PLUGIN_ENABLED: "true"
DICOM_WEB_PLUGIN_ENABLED: "true"
PUBLIC_OHIF_ROOT: "https://my.site.com/orthanc/ohif/"
When I tried to open a study from Orthanc Explorer 2 I’m getting a 404 like this
"HttpError" : "Not Found",
"HttpStatus" : 404,
"Message" : "Unknown resource",
"Method" : "GET",
"OrthancError" : "Unknown resource",
"OrthancStatus" : 17,
"Uri" : "/ohifviewer"
}
this confuses me as I’m not sure how it determines the URI. Any ideas. Any baseline example that I can follow?
The log doesn’t seem to give much insight:
orthanc-backend | T0221 04:42:14.089814 WEBDAV-UPLOAD OrthancWebDav.cpp:1187] Cleaning up the empty WebDAV upload folders
orthanc-backend | T0221 04:42:14.305108 HTTP-19 HttpServer.cpp:1187] (http) HTTP header: [host]: [my.site.com]
orthanc-backend | T0221 04:42:14.305143 HTTP-19 HttpServer.cpp:1187] (http) HTTP header: [x-forwarded-for]: [172.18.0.1]
orthanc-backend | T0221 04:42:14.305150 HTTP-19 HttpServer.cpp:1187] (http) HTTP header: [connection]: [close]
orthanc-backend | T0221 04:42:14.305157 HTTP-19 HttpServer.cpp:1187] (http) HTTP header: [authorization]: [Basic YWRtaW46b3J0aGFuYw==]
orthanc-backend | T0221 04:42:14.305164 HTTP-19 HttpServer.cpp:1187] (http) HTTP header: [sec-ch-ua]: ["Not(A:Brand";v="99", "Brave";v="133", "Chromium";v="133"]
orthanc-backend | T0221 04:42:14.305170 HTTP-19 HttpServer.cpp:1187] (http) HTTP header: [sec-ch-ua-mobile]: [?0]
orthanc-backend | T0221 04:42:14.305176 HTTP-19 HttpServer.cpp:1187] (http) HTTP header: [sec-ch-ua-platform]: ["macOS"]
orthanc-backend | T0221 04:42:14.305181 HTTP-19 HttpServer.cpp:1187] (http) HTTP header: [upgrade-insecure-requests]: [1]
orthanc-backend | T0221 04:42:14.305188 HTTP-19 HttpServer.cpp:1187] (http) HTTP header: [user-agent]: [Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36]
orthanc-backend | T0221 04:42:14.305194 HTTP-19 HttpServer.cpp:1187] (http) HTTP header: [accept]: [text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8]
orthanc-backend | T0221 04:42:14.305201 HTTP-19 HttpServer.cpp:1187] (http) HTTP header: [sec-gpc]: [1]
orthanc-backend | T0221 04:42:14.305209 HTTP-19 HttpServer.cpp:1187] (http) HTTP header: [accept-language]: [en-US,en;q=0.6]
orthanc-backend | T0221 04:42:14.305217 HTTP-19 HttpServer.cpp:1187] (http) HTTP header: [sec-fetch-site]: [same-origin]
orthanc-backend | T0221 04:42:14.305252 HTTP-19 HttpServer.cpp:1187] (http) HTTP header: [sec-fetch-mode]: [navigate]
orthanc-backend | T0221 04:42:14.305262 HTTP-19 HttpServer.cpp:1187] (http) HTTP header: [sec-fetch-user]: [?1]
orthanc-backend | T0221 04:42:14.305272 HTTP-19 HttpServer.cpp:1187] (http) HTTP header: [sec-fetch-dest]: [document]
orthanc-backend | T0221 04:42:14.305284 HTTP-19 HttpServer.cpp:1187] (http) HTTP header: [referer]: [https://my.site.com/orthanc/ui/app/]
orthanc-backend | T0221 04:42:14.305291 HTTP-19 HttpServer.cpp:1187] (http) HTTP header: [accept-encoding]: [gzip, deflate, br, zstd]
orthanc-backend | T0221 04:42:14.305305 HTTP-19 HttpServer.cpp:1187] (http) HTTP header: [cookie]: [i18next=en-US]
orthanc-backend | I0221 04:42:14.305320 HTTP-19 HttpServer.cpp:1263] (http) GET /ohifviewer
nginx-proxy | 172.18.0.1 - admin [21/Feb/2025:04:42:14 +0000] "GET /orthanc/ohifviewer?StudyInstanceUIDs=1.2.156.14702.1.1000.16.0.20200311113603875 HTTP/1.1" 404 189 "https://my.site.com/orthanc/ui/app/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36" "-"
nginx-proxy | 172.18.0.1 - - [21/Feb/2025:04:42:14 +0000] "GET /favicon.ico HTTP/1.1" 301 169 "https://my.site.com/orthanc/ohifviewer?StudyInstanceUIDs=1.2.156.14702.1.1000.16.0.20200311113603875" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36" "-"
orthanc-backend | T0221 04:42:14.330292 HTTP-20 HttpServer.cpp:1187] (http) HTTP header: [host]: [my.site.com]
orthanc-backend | T0221 04:42:14.330320 HTTP-20 HttpServer.cpp:1187] (http) HTTP header: [x-forwarded-for]: [172.18.0.1]
orthanc-backend | T0221 04:42:14.330324 HTTP-20 HttpServer.cpp:1187] (http) HTTP header: [connection]: [close]
orthanc-backend | T0221 04:42:14.330329 HTTP-20 HttpServer.cpp:1187] (http) HTTP header: [authorization]: [Basic YWRtaW46b3J0aGFuYw==]
orthanc-backend | T0221 04:42:14.330333 HTTP-20 HttpServer.cpp:1187] (http) HTTP header: [sec-ch-ua-platform]: ["macOS"]
orthanc-backend | T0221 04:42:14.330338 HTTP-20 HttpServer.cpp:1187] (http) HTTP header: [user-agent]: [Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36]
orthanc-backend | T0221 04:42:14.330343 HTTP-20 HttpServer.cpp:1187] (http) HTTP header: [sec-ch-ua]: ["Not(A:Brand";v="99", "Brave";v="133", "Chromium";v="133"]
orthanc-backend | T0221 04:42:14.330347 HTTP-20 HttpServer.cpp:1187] (http) HTTP header: [sec-ch-ua-mobile]: [?0]
orthanc-backend | T0221 04:42:14.330351 HTTP-20 HttpServer.cpp:1187] (http) HTTP header: [accept]: [image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8]
orthanc-backend | T0221 04:42:14.330355 HTTP-20 HttpServer.cpp:1187] (http) HTTP header: [sec-gpc]: [1]
orthanc-backend | T0221 04:42:14.330359 HTTP-20 HttpServer.cpp:1187] (http) HTTP header: [accept-language]: [en-US,en;q=0.6]
orthanc-backend | T0221 04:42:14.330364 HTTP-20 HttpServer.cpp:1187] (http) HTTP header: [sec-fetch-site]: [same-origin]
orthanc-backend | T0221 04:42:14.330368 HTTP-20 HttpServer.cpp:1187] (http) HTTP header: [sec-fetch-mode]: [no-cors]
orthanc-backend | T0221 04:42:14.330373 HTTP-20 HttpServer.cpp:1187] (http) HTTP header: [sec-fetch-dest]: [image]
orthanc-backend | T0221 04:42:14.330377 HTTP-20 HttpServer.cpp:1187] (http) HTTP header: [referer]: [https://my.site.com/orthanc/ohifviewer?StudyInstanceUIDs=1.2.156.14702.1.1000.16.0.20200311113603875]
orthanc-backend | T0221 04:42:14.330382 HTTP-20 HttpServer.cpp:1187] (http) HTTP header: [accept-encoding]: [gzip, deflate, br, zstd]
orthanc-backend | T0221 04:42:14.330386 HTTP-20 HttpServer.cpp:1187] (http) HTTP header: [cookie]: [i18next=en-US]
orthanc-backend | I0221 04:42:14.330394 HTTP-20 HttpServer.cpp:1263] (http) GET /ui/app
orthanc-backend | I0221 04:42:14.330424 HTTP-20 OrthancPlugins.cpp:2512] (plugins) Delegating HTTP request to plugin for URI: /ui/app
orthanc-backend | T0221 04:42:14.330439 HTTP-20 OrthancPlugins.cpp:5933] (plugins) Calling service 2000 from plugin /usr/share/orthanc/plugins-available/libOrthancExplorer2.so
nginx-proxy | 172.18.0.1 - admin [21/Feb/2025:04:42:14 +0000] "GET /orthanc/ui/app/ HTTP/1.1" 200 1190 "https://my.site.com/orthanc/ohifviewer?StudyInstanceUIDs=1.2.156.14702.1.1000.16.0.20200311113603875" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36" "-"
orthanc-backend | T0221 04:42:18.554033 SAVE-JOBS ServerContext.cpp:326] Serializing the content of the jobs engine
orthanc-backend | T0221 04:42:18.554622 SAVE-JOBS OrthancPlugins.cpp:5933] (plugins) Calling service 40 from plugin /usr/share/orthanc/plugins-available/libOrthancPostgreSQLIndex.so
orthanc-backend | T0221 04:42:18.558271 SAVE-JOBS OrthancPlugins.cpp:5933] (plugins) Calling service 40 from plugin /usr/share/orthanc/plugins-available/libOrthancPostgreSQLIndex.so
orthanc-backend | T0221 04:42:18.558761 SAVE-JOBS OrthancPlugins.cpp:5933] (plugins) Calling service 40 from plugin /usr/share/orthanc/plugins-available/libOrthancPostgreSQLIndex.so
orthanc-backend | T0221 04:42:18.558788 SAVE-JOBS OrthancPlugins.cpp:5933] (plugins) Calling service 40 from plugin /usr/share/orthanc/plugins-available/libOrthancPostgreSQLIndex.so
orthanc-backend | T0221 04:42:28.663189 SAVE-JOBS ServerContext.cpp:326] Serializing the content of the jobs engine
orthanc-backend | T0221 04:42:28.664823 SAVE-JOBS OrthancPlugins.cpp:5933] (plugins) Calling service 40 from plugin /usr/share/orthanc/plugins-available/libOrthancPostgreSQLIndex.so
orthanc-backend | T0221 04:42:28.669488 SAVE-JOBS OrthancPlugins.cpp:5933] (plugins) Calling service 40 from plugin /usr/share/orthanc/plugins-available/libOrthancPostgreSQLIndex.so
orthanc-backend | T0221 04:42:28.670675 SAVE-JOBS OrthancPlugins.cpp:5933] (plugins) Calling service 40 from plugin /usr/share/orthanc/plugins-available/libOrthancPostgreSQLIndex.so
orthanc-backend | T0221 04:42:28.670747 SAVE-JOBS OrthancPlugins.cpp:5933] (plugins) Calling service 40 from plugin /usr/share/orthanc/plugins-available/libOrthancPostgreSQLIndex.so