# HG changeset patch # User Sebastien Jodogne # Date 1687157953 -7200 # Node ID 19fd9eab4ec05a9eded40ee920602ed0287e2cbd # Parent 2038eb1f55bbe80e2454abdd02b0e0b5f6c8bd2a user configuration of OHIF diff -r 2038eb1f55bb -r 19fd9eab4ec0 Sphinx/source/plugins/ohif.rst --- a/Sphinx/source/plugins/ohif.rst Mon Jun 19 08:00:51 2023 +0200 +++ b/Sphinx/source/plugins/ohif.rst Mon Jun 19 08:59:13 2023 +0200 @@ -130,6 +130,45 @@ } +User configuration of OHIF +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. highlight:: json + +OHIF comes with a number of `configuration options +`__ +that can be fine-tuned by the user. User settings can be injected +using the ``UserConfiguration`` option as follows:: + + { + "Plugins" : [ + "/home/user/orthanc-ohif/Build/libOHIF.so" + ], + "OHIF" : { + "UserConfiguration" : "ohif.json" + } + } + +.. highlight:: javascript + +A minimal ``ohif.json`` would be:: + + window.config = { + extensions: [], + modes: [] + } + +Note that the following configuration options will be overridden by +the OHIF plugin to properly configure the data source and the +integration with the Orthanc Web server: + +* ``window.config.dataSources`` +* ``window.config.defaultDataSourceName`` +* ``window.config.routerBasename`` +* ``window.config.showStudyList`` (set to ``false`` if using the DICOM + JSON data source) + + Router basename ^^^^^^^^^^^^^^^ @@ -234,8 +273,8 @@ studies, hereby greatly speeding up the first opening of those studies as well. -This script would loop over the :ref:`the DICOM studies that are stored -by Orthanc ` using ``GET /studies``. For each study whose -:ref:`Orthanc identifier ` is ``id``, the script -would simply call ``GET /studies/{id}/ohif-dicom-json``. +This script would loop over the :ref:`the DICOM studies that are +stored by Orthanc ` using ``GET /studies``. For each +study whose :ref:`Orthanc identifier ` is ``id``, the +script would simply call ``GET /studies/{id}/ohif-dicom-json``.