annotate Sphinx/source/plugins/ohif.rst @ 953:2038eb1f55bb

finalized ohif documentation
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 19 Jun 2023 08:00:51 +0200
parents 4a76327e83fb
children 19fd9eab4ec0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
952
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 .. _ohif:
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 OHIF plugin
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 ===========
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 .. contents::
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 This **official** plugin by the `ICTEAM institute of UCLouvain
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 <https://uclouvain.be/en/research-institutes/icteam>`__ extends
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 Orthanc with the `OHIF <https://ohif.org/>`__ extensible Web imaging
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 platform.
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13
953
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
14 The plugin greatly simplifies the deployment of OHIF, as it does not
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
15 necessitate the setup of any reverse proxy. It also speeds up the
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
16 loading of
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
17
952
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 Usage
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 -----
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 This plugin adds a dedicated button to Orthanc Explorer, which
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 provides an easy, fast access to the OHIF viewers (click on the image
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 to view a demo video):
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 .. image:: ../images/OHIF.png
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 :align: center
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 :width: 800
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 :target: https://www.youtube.com/watch?v=-lzddzq9iT4
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 |
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 Compilation
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 -----------
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 .. highlight:: bash
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 Official releases can be `downloaded from the Orthanc homepage
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 <https://www.orthanc-server.com/browse.php?path=/plugin-ohif>`__. As
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 an alternative, the `repository containing the source code
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 <https://orthanc.uclouvain.be/hg/orthanc-ohif/>`__ can be accessed
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 using Mercurial.
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 The procedure to compile this plugin is similar of that for the
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 :ref:`core of Orthanc <binaries>`. The following commands should work
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 on most GNU/Linux distributions, provided Docker is installed::
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 $ mkdir Build
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 $ cd Build
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 $ ../Resources/CreateOHIFDist.sh
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 $ cmake .. -DSTATIC_BUILD=ON -DCMAKE_BUILD_TYPE=Release
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 $ make
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 The compilation will produce a shared library ``libOrthancOHIF.so``
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 that contains the OHIF plugin for Orthanc.
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 Pre-compiled Linux Standard Base (LSB) binaries `are available for
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 download <https://lsb.orthanc-server.com/plugin-ohif/>`__.
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 Pre-compiled binaries for Microsoft Windows and macOS `are also
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 available
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 <https://www.orthanc-server.com/browse.php?path=/plugin-ohif>`__.
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 Furthermore, the :ref:`Docker images <docker>`
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 ``jodogne/orthanc-plugins`` and ``osimis/orthanc`` also contain the
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 plugin. Debian and Ubuntu packages can be found in the
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 :ref:`standalone repository <binaries>`
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 ``https://debian.orthanc-labs.com/``.
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 Configuration
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 -------------
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 .. highlight:: json
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 Here is a minimal sample :ref:`configuration file <configuration>` to
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 use this plugin::
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 {
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 "Plugins" : [
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 "/home/user/orthanc-ohif/Build/libOHIF.so"
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 ]
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 }
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 Orthanc must of course be restarted after the modification of its
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 configuration file.
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 Using DICOMweb
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 ^^^^^^^^^^^^^^
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91
953
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
92 .. highlight:: json
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
93
952
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 By default, the plugin uses the `DICOM JSON data source
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 <https://v3-docs.ohif.org/configuration/datasources/dicom-json/>`__ of
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 OHIF. This data source is optimized to provide the fastest access to
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 the DICOM images, while requiring no additional plugin. However, in
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 order to deliver fast access, the OHIF plugin will cache additional
953
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
99 information about each DICOM instance as :ref:`metadata <metadata>` in
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
100 the Orthanc database, which results in a larger size of the Orthanc
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
101 database (an additional 1KB is roughly needed per instance).
952
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102
953
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
103 As an alternative, it is possible to enable the `DICOMweb data source
952
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 <https://v3-docs.ohif.org/configuration/dataSources/dicom-web>`__. In
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 this case, the :ref:`DICOMweb plugin of Orthanc <dicomweb>` must also
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 be loaded. It can also be useful to load the :ref:`GDCM plugin <gdcm>`
953
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
107 if the DICOM images are encoded using a JPEG2k compressed transfer
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
108 syntax.
952
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110 The advantages of using DICOMweb over the default DICOM JSON are:
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 * More standard-compliant.
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 * The OHIF study list is accessible, notably as a button on the
953
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
115 welcome screen of Orthanc Explorer. The study list is not available
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
116 if using the DICOM JSON data source.
952
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 * No additional space is used in the Orthanc database.
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 Here is a minimal configuration file to use DICOMweb::
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122 {
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 "Plugins" : [
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124 "/home/user/orthanc-ohif/Build/libOHIF.so",
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 "/home/user/orthanc-dicomweb/Build/libOHIF.so"
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126 ],
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127 "OHIF" : {
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128 "DataSource" : "dicom-web"
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129 }
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130 }
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 Router basename
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134 ^^^^^^^^^^^^^^^
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135
953
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
136 .. highlight:: json
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
137
952
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 If Orthanc is not branched at the root of a Web server thanks of the
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 presence of a reverse proxy, the configuration option
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140 ``RouterBasename`` must be adapted.
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 For instance, if Orthanc is running at address
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143 ``https://host.com/imaging/demo/orthanc/``, the following
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144 configuration file must be used for OHIF to work::
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146 {
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 "Plugins" : [
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148 "/home/user/orthanc-ohif/Build/libOHIF.so"
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149 ],
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150 "OHIF" : {
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151 "RouterBasename" : "/imaging/demo/orthanc/ohif/"
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152 }
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 }
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 The default value of ``RouterBasename`` is ``/ohif/``.
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157
953
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
158 .. _ohif-preloading:
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
159
952
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160 Preloading
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161 ^^^^^^^^^^
4a76327e83fb started documentation of ohif plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162
953
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
163 .. highlight:: json
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
164
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
165 If using the DICOM JSON data source, whenever a new DICOM instance is
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
166 received by Orthanc, the OHIF plugin will compute a summary of the
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
167 DICOM tags of interest to OHIF, and will store it as :ref:`metadata
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
168 <metadata>` in the Orthanc database. This process has the advantage of
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
169 speeding up even the first opening of the DICOM study by OHIF, which
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
170 probably corresponds to the expectations of most radiologists.
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
171
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
172 However, if your Orthanc deployment is focused on speed, this
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
173 preloading might be undesirable, as it slows down the ingestion of new
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
174 DICOM instances by Orthanc. Furthermore, if your Orthanc server will
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
175 contain a large number of DICOM studies that will never be displayed
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
176 using OHIF, this can result in a waste of space in the Orthanc
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
177 database because of the metadata that will be preloaded, but that will
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
178 never be read.
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
179
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
180 It is consequently possible to turn off the automated preloading
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
181 of metadata using the following configuration::
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
182
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
183 {
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
184 "Plugins" : [
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
185 "/home/user/orthanc-ohif/Build/libOHIF.so"
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
186 ],
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
187 "OHIF" : {
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
188 "DataSource" : "dicom-json",
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
189 "Preload" : false
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
190 }
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
191 }
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
192
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
193 If the ``Preload`` option is set to ``false``, the first display of a
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
194 DICOM study can take several seconds because of the computation of the
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
195 metadata, but subsequent displays will run much faster.
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
196
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
197 Note that preloading is only applied to the newly received instances:
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
198 The DICOM instances that were stored in the Orthanc server before the
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
199 installation of the OHIF plugin will only benefit from the
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
200 optimization starting with their second display using OHIF.
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
201
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
202
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
203 For developers
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
204 --------------
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
205
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
206 Extensions to the REST API
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
207 ^^^^^^^^^^^^^^^^^^^^^^^^^^
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
208
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
209 .. highlight:: bash
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
210
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
211 The content of the `DICOM JSON data source
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
212 <https://v3-docs.ohif.org/configuration/datasources/dicom-json/>`__
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
213 for a DICOM study of interest can be retrieved as follows::
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
214
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
215 $ curl http://demo.orthanc-server.com/studies/6b9e19d9-62094390-5f9ddb01-4a191ae7-9766b715/ohif-dicom-json
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
216
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
217 This data source is constructed from the :ref:`metadata 4202
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
218 <registry>` associated with the individual DICOM instances of the
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
219 DICOM study. The metadata corresponds to the `Base64 encoding
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
220 <https://en.wikipedia.org/wiki/Base64>`__ of a gzipped JSON file. For
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
221 debugging, the JSON file associated with a DICOM instance can be
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
222 inspected using::
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
223
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
224 $ curl http://demo.orthanc-server.com/instances/1f3c00bd-49df10b7-f416a598-1b3bb5a2-cb791b52/metadata/4202 | base64 -d | gunzip -c
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
225
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
226
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
227 Preloading existing studies
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
228 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
229
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
230 :ref:`As explained above <ohif-preloading>`, the metadata associated
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
231 with DICOM instances are only preloaded for the newly ingested DICOM
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
232 instances. Using the REST API of Orthanc, it is easy to create a
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
233 script that would preload the metadata for the already existing DICOM
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
234 studies, hereby greatly speeding up the first opening of those studies
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
235 as well.
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
236
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
237 This script would loop over the :ref:`the DICOM studies that are stored
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
238 by Orthanc <rest-access>` using ``GET /studies``. For each study whose
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
239 :ref:`Orthanc identifier <orthanc-identifiers>` is ``id``, the script
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
240 would simply call ``GET /studies/{id}/ohif-dicom-json``.
2038eb1f55bb finalized ohif documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 952
diff changeset
241