Orthanc & OHIF Plugin Config Sanity Check

Hello everyone, I am hoping someone can help me with this configuration. My overall goal is to get Orthanc running using Postgres, the OHIF Plugin and be able to make API calls to Orthanc.

A few questions. I am trying to keep my configs as minimal as possible, and I have a feeling I am missing something here. I also feel like my configs contain more than I need.

  1. Are these configurations correct for dicom-web to work properly with the OHIF Plugin?
  2. In my Orthanc config, is the DicomWeb section necessary if all I want to use is the OHIF Plugin? Or do I need that block to be able to make API calls to Orthanc?
  3. In my ohif.js config file, I read that window.config.dataSources is overwritten by the OHIF plugin. This may be a dumb question, but does that mean there’s no point in defining that section in the file at all? In other words, is the entire dataSources section effectively ignored? I’m asking because I’d like to enable options such as enableStudyLazyLoad, supportsFuzzyMatching, and supportsWildcard. Since those settings are defined inside the dataSources section, I’m concerned they are not actually being loaded or applied by OHIF.

I have been going through the documentation and forums posts, but I am still a little confused on those few things. Below are my configs. Any help would be greatly appreciated!

Orthanc Config:

{
  "Name": "OrthancTEST1",
  "DicomAet": "TESTS1",
  "RemoteAccessAllowed": true,
  "AuthenticationEnabled": true,
  "WebDavEnabled": false,
  "DefaultEncoding": "Utf8",
  "PostgreSQL": {
    "EnableIndex": true,
    "EnableStorage": false,
    "Port": 5432,
    "Host": "orthanc-index",
    "Database": "test",
    "Username": "test",
    "Password": "test",
    "Lock": false
  },
  "RegisteredUsers": {
    "user1": "user1",
    "user2": "user2"
  },
  "DicomWeb": {
    "Enable": true,
    "Root": "/dicom-web/",
    "EnableWado": true,
    "WadoRoot": "/wado",
    "Ssl": false,
    "QidoCaseSensitive": true,
    "StudiesMetadata": "Full",
    "SeriesMetadata": "Full",
    "EnableMetadataCache": true,
    "EnablePerformanceLogs": false,
    "MetadataWorkerThreadsCount": 4,
    "WadoRsLoaderThreadsCount": 0,
    "PublicRoot": "/dicom-web/"
  },
  "OHIF": {
    "DataSource": "dicom-web",
    "UserConfiguration": "/etc/orthanc/ohif.js"
  }
}

docker compose file:

services:

  orthanc:
    image: orthancteam/orthanc
    depends_on: [orthanc-index]
    restart: unless-stopped
    ports: ["4242:4242", "8042:8042"]
    volumes: ["./orthanc-storage:/var/lib/orthanc/db", "./ohif.js:/etc/orthanc/ohif.js:ro"]
    environment:
      VERBOSE_STARTUP: "true"
      VERBOSE_ENABLED: "true"
      OHIF_PLUGIN_ENABLED: "true"
      STONE_WEB_VIEWER_PLUGIN_ENABLED: "true"
      DICOM_WEB_PLUGIN_ENABLED: "true"
      POSTGRESQL_PLUGIN_ENABLED: "true"
      GDCM_PLUGIN_ENABLED: "true"
    secrets:
      - configuration.json

  orthanc-index:
    image: postgres:15
    restart: unless-stopped
    ports: ["5432:5432"]
    volumes: ["./orthanc-index:/var/lib/postgresql/data"]
    environment:
      POSTGRES_HOST_AUTH_METHOD: "trust"

secrets:
    configuration.json:
      file: configuration.json

volumes:
  orthanc-storage:
  orthanc-index:

Finally, my ohif.js configuration file:

window.config = {
  extensions: [],
  modes: [],
  showStudyList: true,
  useNorm16Texture: true,
  investigationalUseDialog: {
    value: "never"
  },
  dataSources: [
    {
      namespace: '@ohif/extension-default.dataSourcesModule.dicomweb',
      sourceName: 'dicomweb',
      configuration: {
        name: 'ohif3',
        wadoUriRoot: 'http://192.168.0.1/pacs//wado',
        qidoRoot: 'http://192.168.0.1/pacs/rs',
        wadoRoot: 'http://192.168.0.1/pacs/rs',
        qidoSupportsIncludeField: true,
        supportsReject: true,
        imageRendering: 'wadors',
        thumbnailRendering: 'wadors',
        enableStudyLazyLoad: true,
        supportsFuzzyMatching: true,
        supportsWildcard: true,
      },
    },
  ],
  defaultDataSourceName: 'dicomweb',
};

Hi, is anyone able to help?

I realize the third question might be better asked in the OHIF community, but I am just trying to see how the OHIF Plugin for Orthanc reads and applies the OHIF configuration before I go asking them for further help :slight_smile:

Hello @idavid

what problem are you trying to solve?

is this configuration not working? if it’s not working, are there any error messages you can share?

or is it working and you’d like to minimize the configuration footprint?

to minimize the config footprint, you can also use this to determine default values for certain configs orthanc: 0de465763749 OrthancServer/Resources/Configuration.json

Hi @olivert

I have really one main problem I am trying to solve that relates to the OHIF Plugin configuration. On this page, OHIF plugin — Orthanc Book documentation, it says window.config.dataSources is overwritten by the OHIF plugin to make sure everything works. Which is great but I want to apply OHIF options such enableStudyLazyLoad, supportsFuzzyMatching, and supportsWildcard. According to OHIF configuration documentation (Configuration Files | OHIF), those options are defined in the dataSources section. So, I would like to know if Orthanc’s OHIF Plugin completely overwrites/ignores that section completely or not. I tried to add those options outside of the dataSources section. However, whenever I search for a study, I can’t use wildcards and in Orthanc’s logs it says that fuzzy matching is not enabled. I hope that helps get across what I am trying to do.

The second thing is I would definitely like to simplify my configuration files if I can.