ohif-viewer/docs/latest/essentials/configuration.md
Erik Ziegler a4112c46a5
fix(package.json): Bump WADO Image Loader dependency, remove unnecessary worker and codec paths (#727)
Note: had to disable sourcemaps for commonjs modules. This seems to be the only way to prevent memory issues on CircleCI.
2019-07-30 11:00:08 +02:00

2.3 KiB

Configuration

This step assumes you have an imaging archive. If you need assistance setting one up, check out the Data Source Guide or a deployment recipe that contains an open source Image Archive

How it Works

The configuration for our project is in the /public/config directory. Our build process knows which configuration file to use based on the REACT_APP_CONFIG environment variable. By default, its value is default.js. When we build, the %REACT_APP_CONFIG% value in our/public/index.html file is substituted for the correct configuration file's name. This sets the window.config equal to our configuration file's value.

How do I configure my project?

The simplest way is to update the existing default config:

/public/config/default.js

window.config = {
  routerBasename: '/',
  servers: {
    dicomWeb: [
      {
        name: 'DCM4CHEE',
        wadoUriRoot: 'https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/wado',
        qidoRoot: 'https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/rs',
        wadoRoot: 'https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/rs',
        qidoSupportsIncludeField: true,
        imageRendering: 'wadors',
        thumbnailRendering: 'wadors',
        requestOptions: {
          requestFromBrowser: true,
        },
      },
    ],
  },
}

You can also create a new config file and specify its path relative to the build output's root by setting the REACT_APP_CONFIG environment variable. You can set the value of this environment variable a few different ways:

After updating the configuration, yarn run build:web to generate updated build output.