Mercurial > hg > orthanc-book
annotate Sphinx/source/plugins/webviewer.rst @ 349:60080d792f25
rephrasing
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 27 Mar 2020 18:21:55 +0100 |
parents | 861643d5f808 |
children | 011b01ccf52d |
rev | line source |
---|---|
24 | 1 .. _webviewer: |
2 | |
3 | |
303 | 4 Orthanc Web Viewer plugin |
5 ========================= | |
24 | 6 |
27 | 7 .. contents:: |
8 | |
24 | 9 This **official** plugin extends Orthanc with a Web viewer of medical images. |
27 | 10 |
11 For general information, check out the `official homepage of the | |
12 plugin <http://www.orthanc-server.com/static.php?page=web-viewer>`__. | |
28 | 13 |
14 | |
15 Compilation | |
16 ----------- | |
17 | |
81 | 18 .. highlight:: bash |
28 | 19 |
20 The procedure to compile these plugins is similar of that for the | |
31
93bbfaf0e62c
worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
29
diff
changeset
|
21 :ref:`core of Orthanc <binaries>`. The following commands should work |
28 | 22 for every UNIX-like distribution (including GNU/Linux):: |
23 | |
24 $ mkdir Build | |
25 $ cd Build | |
81 | 26 $ cmake .. -DSTATIC_BUILD=ON -DCMAKE_BUILD_TYPE=Release |
28 | 27 $ make |
28 | |
29 The compilation will produce a shared library ``OrthancWebViewer`` | |
30 that contains the Web viewer plugin. Pre-compiled binaries for | |
31 Microsoft Windows `are also available | |
32 <http://www.orthanc-server.com/browse.php?path=/plugin-webviewer>`__. | |
33 | |
32
03b32d0e49f2
documentation of the dicomweb plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
31
diff
changeset
|
34 *Remark:* Some older build instructions are also available in the |
03b32d0e49f2
documentation of the dicomweb plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
31
diff
changeset
|
35 `source distribution |
03b32d0e49f2
documentation of the dicomweb plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
31
diff
changeset
|
36 <https://bitbucket.org/sjodogne/orthanc-webviewer/src/default/Resources/BuildInstructions.txt>`__. |
03b32d0e49f2
documentation of the dicomweb plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
31
diff
changeset
|
37 |
28 | 38 |
39 Usage | |
40 ----- | |
41 | |
42 .. highlight:: json | |
43 | |
44 You of course first have to :ref:`install Orthanc <compiling>`. Once | |
45 Orthanc is installed, you must change the :ref:`configuration file | |
46 <configuration>` to tell Orthanc where it can find the plugin: This is | |
47 done by properly modifying the ``Plugins`` option. You could for | |
48 instance use the following configuration file:: | |
49 | |
50 { | |
51 "Name" : "MyOrthanc", | |
52 [...] | |
53 "Plugins" : [ | |
54 "/home/user/OrthancWebViewer/Build/libOrthancWebViewer.so" | |
55 ] | |
56 } | |
57 | |
58 .. highlight:: text | |
59 | |
60 Orthanc must of course be restarted after the modification of its | |
61 configuration file. The log will contain an output similar to:: | |
62 | |
63 # Orthanc ./Configuration.json | |
64 W0226 16:59:10.480226 7906 main.cpp:636] Orthanc version: mainline | |
65 [...] | |
66 W0226 16:59:10.519664 7906 PluginsManager.cpp:258] Registering plugin 'web-viewer' (version 1.0) | |
67 W0226 16:59:10.519696 7906 PluginsManager.cpp:148] Initializing the Web viewer | |
68 W0226 16:59:10.520004 7906 PluginsManager.cpp:148] Web viewer using 6 threads for the decoding of the DICOM images | |
69 W0226 16:59:10.520021 7906 PluginsManager.cpp:148] Storing the cache of the Web viewer in folder: OrthancStorage/WebViewerCache | |
70 W0226 16:59:10.522011 7906 PluginsManager.cpp:148] Web viewer using a cache of 100 MB | |
71 [...] | |
72 W0226 16:59:10.530807 7906 main.cpp:516] HTTP server listening on port: 8042 | |
73 W0226 16:59:10.581029 7906 main.cpp:526] DICOM server listening on port: 4242 | |
74 W0226 16:59:10.581066 7906 main.cpp:533] Orthanc has started | |
75 | |
76 Once a :ref:`DICOM series <model-world>` is opened using Orthanc | |
77 Explorer, a yellow button entitled ``Orthanc Web Viewer`` will show | |
78 up. It will open the Web viewer for that particular series. See also | |
79 the demonstration video on `official homepage of the plugin | |
80 <http://www.orthanc-server.com/static.php?page=web-viewer>`__. | |
81 | |
82 | |
83 Advanced options | |
84 ---------------- | |
85 | |
86 .. highlight:: json | |
87 | |
88 The configuration of the Web viewer can be fine-tuned by adding some options:: | |
89 | |
90 { | |
91 "Name" : "MyOrthanc", | |
92 [...] | |
93 "Plugins" : [ | |
94 "/home/user/OrthancWebViewer/Build/libOrthancWebViewer.so" | |
95 ], | |
96 "WebViewer" : { | |
97 "CachePath" : "WebViewerCache", | |
98 "CacheSize" : 10, | |
29
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
99 "Threads" : 4, |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
100 "EnableGdcm" : false |
28 | 101 } |
102 } | |
103 | |
104 * ``CachePath`` specifies the location of the cache of the Web | |
105 viewer. By default, the cache is located inside the storage | |
106 directory of Orthanc. | |
107 * ``CacheSize`` specifies the maximum size for the cached images, in | |
108 megabytes. By default, a cache of 100 MB is used. | |
109 * ``Threads`` specifies the number of threads that are used by the | |
110 plugin to decode the DICOM images. | |
29
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
111 * ``EnableGdcm`` specifies whether `GDCM |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
112 <https://sourceforge.net/projects/gdcm/>`__ should be used to decode |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
113 DICOM images, replacing the built-in decoder of Orthanc that |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
114 internally uses `DCMTK <http://dicom.offis.de/dcmtk.php.en>`__. |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
115 This is notably necessary to deal with DICOM images encoded using |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
116 `JPEG2000 <https://en.wikipedia.org/wiki/JPEG_2000>`__, as this |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
117 format is not readily supported by the core version of DCMTK. By |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
118 default, this option is set to ``true``. |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
119 |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
120 As a complement to the ``EnableGdcm`` option, you also have the |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
121 possibility to restrict the GDCM decoder to some specific `transfer |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
122 syntaxes |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
123 <http://dicom.nema.org/medical/dicom/current/output/html/part05.html#chapter_10>`__ |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
124 using the ``RestrictTransferSyntaxes`` option. For instance, the |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
125 following configuration would use GDCM to decode JPEG 2000 images, |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
126 while using DCMTK to decode the other transfer syntaxes:: |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
127 |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
128 { |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
129 [...] |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
130 "WebViewer" : { |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
131 "EnableGdcm" : true, |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
132 "RestrictTransferSyntaxes" : [ |
45 | 133 "1.2.840.10008.1.2.4.90", // JPEG 2000 Image Compression (Lossless Only) |
134 "1.2.840.10008.1.2.4.91", // JPEG 2000 Image Compression | |
135 "1.2.840.10008.1.2.4.92", // JPEG 2000 Part 2 Multicomponent Image Compression (Lossless Only) | |
136 "1.2.840.10008.1.2.4.93" // JPEG 2000 Part 2 Multicomponent Image Compression | |
29
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
137 ] |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
138 } |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
139 } |
49
6c9771c7db47
safe to remove Web viewer cache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
45
diff
changeset
|
140 |
6c9771c7db47
safe to remove Web viewer cache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
45
diff
changeset
|
141 |
6c9771c7db47
safe to remove Web viewer cache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
45
diff
changeset
|
142 Frequently Asked Questions |
6c9771c7db47
safe to remove Web viewer cache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
45
diff
changeset
|
143 -------------------------- |
6c9771c7db47
safe to remove Web viewer cache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
45
diff
changeset
|
144 |
6c9771c7db47
safe to remove Web viewer cache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
45
diff
changeset
|
145 * If **Orthanc does not start anymore** after a hard shutdown, this |
6c9771c7db47
safe to remove Web viewer cache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
45
diff
changeset
|
146 might reflect a corruption in the cache of the Web viewer. In such a |
6c9771c7db47
safe to remove Web viewer cache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
45
diff
changeset
|
147 case, it is safe to remove the folder that contains the cache. By |
6c9771c7db47
safe to remove Web viewer cache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
45
diff
changeset
|
148 default, this folder is called |
6c9771c7db47
safe to remove Web viewer cache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
45
diff
changeset
|
149 ``OrthancStorage/WebViewerCache/``. Of course, don't remove the |
6c9771c7db47
safe to remove Web viewer cache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
45
diff
changeset
|
150 folder ``OrthancStorage/``, as it contains the DICOM files. |