Study JSON output for OHIF viewer

Is there a simple way to get Orthanc to spit out a properly formatted JSON file for OHIF viewer as shown here: https://v3-docs.ohif.org/configuration/dataSources/dicom-json

The only way I can think it do it now is by querying the endpoints module?simplified and instance-tags?simplified then combining the data.

I have not looked at that for awhile, but I might want to revisit integrating OHIF into some of my projects because OHIF has improved since last look.

If you have not already, you might want to read this section in the Orthanc Book about DicomWeb:

https://book.orthanc-server.com/plugins/dicomweb.html?highlight=extramaindicomtags

There are some sample Docker setups provided by Osimis located here:

https://bitbucket.org/osimis/orthanc-setup-samples/src/master/docker/ohif/

https://bitbucket.org/osimis/orthanc-setup-samples/src/master/docker/meddream/

I know that for med dream there is actually a custom Python script that returns some customized data used by the MedDream viewer. Doing something similar for OHIF might be an option, but I’d have to dig into the details. Just optimizing the DicomWeb config might be sufficient.

You also might want to look at this section regarding support for OHIF since that forum might be another place to ask your question:

https://book.orthanc-server.com/users/support.html?highlight=ohif

or maybe:

https://groups.google.com/g/cornerstone-platform

There might be a different group for OHIF.

Stephen D. Scotti

Hello,

Orthanc is natively supported as a data source to OHIF, as described on this page:
https://docs.ohif.org/configuring/data-source.html

If you really need to spit a “dicom-json” file that is suitable for OHIF, as indicated by Stephen, creating a Python plugin for Orthanc is clearly the way to go:
https://book.orthanc-server.com/plugins/python.html

Regards,
Sébastien-

Hello,

Another point, if you want to use the Docker setups provided by Osimis as said by Stephen, but with ohif v3, the only working branch right now is the fix/v3-stable-docker.

Here is a working docker-compose file, using the same nginx folder located on osimis bitbucket sample (https://bitbucket.org/osimis/orthanc-setup-samples/src/master/docker/ohif/):

version: ‘3’
services:
ohif:
build:
context: https://github.com/OHIF/Viewers.git#fix/v3-stable-docker
dockerfile: Dockerfile
ports:

  • 80:80
  • 81:81
    restart: unless-stopped
    volumes:
  • ./nginx/mime.types:/etc/nginx/mime.types
  • ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
  • ./nginx/ohif.js:/usr/share/nginx/html/app-config.js
    depends_on:
  • orthanc

orthanc:
image: osimis/orthanc:master-unstable
restart: unless-stopped
environment:
ORTHANC__NAME: “Orthanc for OHIF”
DICOM_WEB_PLUGIN_ENABLED: “true”
ORTHANC__ORTHANC_EXPLORER_2__UI_OPTIONS__ENABLE_OPEN_IN_OHIF_VIEWER: “true”
ORTHANC__ORTHANC_EXPLORER_2__UI_OPTIONS__OHIF_VIEWER_PUBLIC_ROOT: “http://localhost:81/Viewer/
ORTHANC__REGISTERED_USERS: |
{“demo”: “demo”}
VERBOSE_STARTUP: “true”

volumes:

  • orthanc-storage:/var/lib/orthanc/db/

volumes:
orthanc-storage:

Unfortunately these solutions force me to expose DICOMweb which is what I’m trying to avoid. The DICOM JSON integration allows me to tokenize and secure access to individual studies. I ended up writing out an endpoint to process a study into JSON format with a one-time access token to grant access to the JSON study data. I appreciate everyone’s input here though. :blush: