Mercurial > hg > orthanc-book
annotate Sphinx/source/plugins/webviewer.rst @ 29:1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 20 Jul 2016 11:04:15 +0200 |
parents | dc235678897c |
children | 93bbfaf0e62c |
rev | line source |
---|---|
24 | 1 .. _webviewer: |
2 | |
3 | |
4 Web Viewer plugin | |
5 ================= | |
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 | |
18 .. highlight:: text | |
19 | |
20 The procedure to compile these plugins is similar of that for the | |
21 :ref:`core of Orthanc <compiling>`. The following commands should work | |
22 for every UNIX-like distribution (including GNU/Linux):: | |
23 | |
24 $ mkdir Build | |
25 $ cd Build | |
26 $ cmake .. -DSTATIC_BUILD=ON | |
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 | |
34 | |
35 Usage | |
36 ----- | |
37 | |
38 .. highlight:: json | |
39 | |
40 You of course first have to :ref:`install Orthanc <compiling>`. Once | |
41 Orthanc is installed, you must change the :ref:`configuration file | |
42 <configuration>` to tell Orthanc where it can find the plugin: This is | |
43 done by properly modifying the ``Plugins`` option. You could for | |
44 instance use the following configuration file:: | |
45 | |
46 { | |
47 "Name" : "MyOrthanc", | |
48 [...] | |
49 "Plugins" : [ | |
50 "/home/user/OrthancWebViewer/Build/libOrthancWebViewer.so" | |
51 ] | |
52 } | |
53 | |
54 .. highlight:: text | |
55 | |
56 Orthanc must of course be restarted after the modification of its | |
57 configuration file. The log will contain an output similar to:: | |
58 | |
59 # Orthanc ./Configuration.json | |
60 W0226 16:59:10.480226 7906 main.cpp:636] Orthanc version: mainline | |
61 [...] | |
62 W0226 16:59:10.519664 7906 PluginsManager.cpp:258] Registering plugin 'web-viewer' (version 1.0) | |
63 W0226 16:59:10.519696 7906 PluginsManager.cpp:148] Initializing the Web viewer | |
64 W0226 16:59:10.520004 7906 PluginsManager.cpp:148] Web viewer using 6 threads for the decoding of the DICOM images | |
65 W0226 16:59:10.520021 7906 PluginsManager.cpp:148] Storing the cache of the Web viewer in folder: OrthancStorage/WebViewerCache | |
66 W0226 16:59:10.522011 7906 PluginsManager.cpp:148] Web viewer using a cache of 100 MB | |
67 [...] | |
68 W0226 16:59:10.530807 7906 main.cpp:516] HTTP server listening on port: 8042 | |
69 W0226 16:59:10.581029 7906 main.cpp:526] DICOM server listening on port: 4242 | |
70 W0226 16:59:10.581066 7906 main.cpp:533] Orthanc has started | |
71 | |
72 Once a :ref:`DICOM series <model-world>` is opened using Orthanc | |
73 Explorer, a yellow button entitled ``Orthanc Web Viewer`` will show | |
74 up. It will open the Web viewer for that particular series. See also | |
75 the demonstration video on `official homepage of the plugin | |
76 <http://www.orthanc-server.com/static.php?page=web-viewer>`__. | |
77 | |
78 | |
79 Advanced options | |
80 ---------------- | |
81 | |
82 .. highlight:: json | |
83 | |
84 The configuration of the Web viewer can be fine-tuned by adding some options:: | |
85 | |
86 { | |
87 "Name" : "MyOrthanc", | |
88 [...] | |
89 "Plugins" : [ | |
90 "/home/user/OrthancWebViewer/Build/libOrthancWebViewer.so" | |
91 ], | |
92 "WebViewer" : { | |
93 "CachePath" : "WebViewerCache", | |
94 "CacheSize" : 10, | |
29
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
95 "Threads" : 4, |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
96 "EnableGdcm" : false |
28 | 97 } |
98 } | |
99 | |
100 * ``CachePath`` specifies the location of the cache of the Web | |
101 viewer. By default, the cache is located inside the storage | |
102 directory of Orthanc. | |
103 * ``CacheSize`` specifies the maximum size for the cached images, in | |
104 megabytes. By default, a cache of 100 MB is used. | |
105 * ``Threads`` specifies the number of threads that are used by the | |
106 plugin to decode the DICOM images. | |
29
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
107 * ``EnableGdcm`` specifies whether `GDCM |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
108 <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
|
109 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
|
110 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
|
111 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
|
112 `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
|
113 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
|
114 default, this option is set to ``true``. |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
115 |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
116 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
|
117 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
|
118 syntaxes |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
119 <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
|
120 using the ``RestrictTransferSyntaxes`` option. For instance, the |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
121 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
|
122 while using DCMTK to decode the other transfer syntaxes:: |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
123 |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
124 { |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
125 [...] |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
126 "WebViewer" : { |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
127 "EnableGdcm" : true, |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
128 "RestrictTransferSyntaxes" : [ |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
129 "1.2.840.10008.1.2.4.90", # JPEG 2000 Image Compression (Lossless Only) |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
130 "1.2.840.10008.1.2.4.91", # JPEG 2000 Image Compression |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
131 "1.2.840.10008.1.2.4.92", # JPEG 2000 Part 2 Multicomponent Image Compression (Lossless Only) |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
132 "1.2.840.10008.1.2.4.93" # JPEG 2000 Part 2 Multicomponent Image Compression |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
133 ] |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
134 } |
1a6c863cf364
EnableGdcm and RestrictTransferSyntaxes options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
28
diff
changeset
|
135 } |