Mercurial > hg > orthanc-stone
annotate Applications/Samples/README.md @ 2094:7c3d65166c26
partial integration dicom-sr->mainline
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 08 Nov 2023 14:54:15 +0100 |
parents | 9b69970fbdb5 |
children | 5653b6335642 |
rev | line source |
---|---|
1360 | 1 General |
2 ======= | |
3 These samples assume that a recent version of Orthanc is checked out in an | |
4 `orthanc` folder next to the `orthanc-stone` folder. Let's call the top folder | |
5 the `devroot` folder. This name does not matter and is not used anywhere. | |
6 | |
7 Here's the directory layout that we suggest: | |
8 | |
9 ``` | |
10 devroot/ | |
11 | | |
12 +- orthanc/ | |
13 | | |
14 +- orthanc-stone/ | |
15 | | |
16 ... | |
17 ``` | |
18 | |
19 Orthanc can be retrieved with: | |
20 ``` | |
21 hg clone https://hg.orthanc-server.com/orthanc | |
22 ``` | |
1378 | 23 |
24 Furthermore, the samples usually assume that an Orthanc is running locally, | |
25 without authentication, on port 8042. The samples can easily be tweaked if | |
26 your setup is different. | |
27 | |
28 When Dicom resources are to be displayed, their IDs can be supplied in the | |
29 various ways suitable for the platform (command-line arguments, URL parameters | |
30 or through the GUI) | |
31 | |
1419
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
32 |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
33 This repo contains two sample projects: |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
34 |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
35 SingleFrameViewer |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
36 ----------------- |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
37 |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
38 This sample application displays a single frame of a Dicom instance that can |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
39 be loaded from Orthanc, either by using the Orthanc REST API or through the |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
40 Dicomweb server functionality of Orthanc. |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
41 |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
42 RtViewer |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
43 -------- |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
44 |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
45 This sample application displays set of Radiotherapy data: |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
46 - a CT scan |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
47 - an RT-Dose |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
48 - an RT-Struct |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
49 |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
50 The WebAssembly version displays 3 viewports with MPR data |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
51 while the SDL sample displays a single viewport. |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
52 |
1360 | 53 |
54 WebAssembly samples | |
55 =================== | |
56 | |
57 Building the WebAssembly samples require the Emscripten SDK | |
58 (https://emscripten.org/). This SDK goes far beyond the simple compilation to | |
59 the wasm (Web Assembly) bytecode and provides a comprehensive library that | |
60 eases porting native C and C++ programs and libraries. The Emscripten SDK also | |
61 makes it easy to generate the companion Javascript files requires to use a | |
62 wasm module in a web application. | |
63 | |
64 Although Emscripten runs on all major platforms, Stone of Orthanc is developed | |
65 and tested with the Linux version of Emscripten. | |
66 | |
67 Emscripten runs perfectly fine under the Windows Subsystem for Linux (that is | |
68 the environment used quite often by the Stone of Orthanc team) | |
69 | |
70 **Important note:** The following examples **and the build scripts** will | |
71 assume that you have installed the Emscripten SDK in `~/apps/emsdk`. | |
72 | |
73 The following packages should get you going (a Debian-like distribution such | |
74 as Debian or Ubuntu is assumed) | |
75 | |
76 ``` | |
77 sudo apt-get update | |
78 sudo apt-get install -y build-essential curl wget git python cmake pkg-config | |
79 sudo apt-get install -y mercurial unzip npm ninja-build p7zip-full gettext-base | |
80 ``` | |
81 | |
1419
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
82 To build the Wasm samples, just launch the `build-wasm-samples.sh` script from |
1395
62dc0d737e7b
build script for wasm sample + updated instructions + fixed Sdl sample for Orthanc listening on other ports that 8042
Alain Mazy <alain@mazy.be>
parents:
1378
diff
changeset
|
83 this folder. Optionaly, you can pass the build type as an argument. |
62dc0d737e7b
build script for wasm sample + updated instructions + fixed Sdl sample for Orthanc listening on other ports that 8042
Alain Mazy <alain@mazy.be>
parents:
1378
diff
changeset
|
84 We suggest that you do *not* use the `Debug` configuration unless you really |
1360 | 85 need it, for the additional checks that are made will lead to a very long |
86 build time and much slower execution (more severe than with a native non-wasm | |
87 target) | |
1378 | 88 |
1395
62dc0d737e7b
build script for wasm sample + updated instructions + fixed Sdl sample for Orthanc listening on other ports that 8042
Alain Mazy <alain@mazy.be>
parents:
1378
diff
changeset
|
89 In order to run the sample, you may serve it with the ServeFolders plugin. |
62dc0d737e7b
build script for wasm sample + updated instructions + fixed Sdl sample for Orthanc listening on other ports that 8042
Alain Mazy <alain@mazy.be>
parents:
1378
diff
changeset
|
90 You can i.e: add such a section in your orthanc configuration file: |
62dc0d737e7b
build script for wasm sample + updated instructions + fixed Sdl sample for Orthanc listening on other ports that 8042
Alain Mazy <alain@mazy.be>
parents:
1378
diff
changeset
|
91 |
62dc0d737e7b
build script for wasm sample + updated instructions + fixed Sdl sample for Orthanc listening on other ports that 8042
Alain Mazy <alain@mazy.be>
parents:
1378
diff
changeset
|
92 ``` |
62dc0d737e7b
build script for wasm sample + updated instructions + fixed Sdl sample for Orthanc listening on other ports that 8042
Alain Mazy <alain@mazy.be>
parents:
1378
diff
changeset
|
93 { |
62dc0d737e7b
build script for wasm sample + updated instructions + fixed Sdl sample for Orthanc listening on other ports that 8042
Alain Mazy <alain@mazy.be>
parents:
1378
diff
changeset
|
94 "Plugins" : ["LibServeFolders.so], |
62dc0d737e7b
build script for wasm sample + updated instructions + fixed Sdl sample for Orthanc listening on other ports that 8042
Alain Mazy <alain@mazy.be>
parents:
1378
diff
changeset
|
95 "ServeFolders" : { |
1419
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
96 "/single-frame-viewer" : "..../out/install-stone-wasm-samples-RelWithDebInfo/SingleFrameViewer", |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
97 "/rt-viewer": "..../out/install-stone-wasm-samples-RelWithDebInfo/RtViewer" |
1395
62dc0d737e7b
build script for wasm sample + updated instructions + fixed Sdl sample for Orthanc listening on other ports that 8042
Alain Mazy <alain@mazy.be>
parents:
1378
diff
changeset
|
98 } |
62dc0d737e7b
build script for wasm sample + updated instructions + fixed Sdl sample for Orthanc listening on other ports that 8042
Alain Mazy <alain@mazy.be>
parents:
1378
diff
changeset
|
99 } |
62dc0d737e7b
build script for wasm sample + updated instructions + fixed Sdl sample for Orthanc listening on other ports that 8042
Alain Mazy <alain@mazy.be>
parents:
1378
diff
changeset
|
100 ``` |
62dc0d737e7b
build script for wasm sample + updated instructions + fixed Sdl sample for Orthanc listening on other ports that 8042
Alain Mazy <alain@mazy.be>
parents:
1378
diff
changeset
|
101 |
1419
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
102 You'll then be able to open the single-frame-viewer demo at `http://localhost:8042/single-frame-viewer/index.html` |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
103 |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
104 The rt-viewer demo at |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
105 `http://localhost:8044/rt-viewer/index.html?ctseries=a04ecf01-79b2fc33-58239f7e-ad9db983-28e81afa&rtdose=eac822ef-a395f94e-e8121fe0-8411fef8-1f7bffad&rtstruct=54460695-ba3885ee-ddf61ac0-f028e31d-a6e474d9`. Note that you must provide 3 ids in the url: |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
106 |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
107 - the CT series Orthanc ID |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
108 - the RT-Dose instance Orthanc ID |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
109 - the RT-Struct instance Orthanc ID |
1395
62dc0d737e7b
build script for wasm sample + updated instructions + fixed Sdl sample for Orthanc listening on other ports that 8042
Alain Mazy <alain@mazy.be>
parents:
1378
diff
changeset
|
110 |
62dc0d737e7b
build script for wasm sample + updated instructions + fixed Sdl sample for Orthanc listening on other ports that 8042
Alain Mazy <alain@mazy.be>
parents:
1378
diff
changeset
|
111 |
1406
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
112 RtViewer |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
113 ----------------- |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
114 |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
115 This sample application displays three MPR views of a CT+RTDOSE+RTSTRUCT dataset, loaded from Orthanc. The Orthanc IDs of the dataset must be supplied as URL parameters like: |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
116 |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
117 ``` |
1517
307a805d0587
rtviewer --> stone-rtviewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
1512
diff
changeset
|
118 http://localhost:9979/stone-rtviewer/index.html?loglevel=info&ctseries=a04ecf01-79b2fc33-58239f7e-ad9db983-28e81afa&rtdose=830a69ff-8e4b5ee3-b7f966c8-bccc20fb-d322dceb&rtstruct=54460695-ba3885ee-ddf61ac0-f028e31d-a6e474d9 |
1406
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
119 ``` |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
120 |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
121 (notice the loglevel parameter that can be `warning`, `info` or `trace`, in increasing verbosity order) |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
122 |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
123 This sample uses plain Javascript and requires the |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
124 Emscripten toolchain and cmake, in addition to a few standard packages. |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
125 |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
126 To build it, just launch the `build-wasm-RtViewer.sh` script from |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
127 this folder. Optionaly, you can pass the build type as an argument. |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
128 We suggest that you do *not* use the `Debug` configuration unless you really |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
129 need it, for the additional checks that are made will lead to a very long |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
130 build time and much slower execution (more severe than with a native non-wasm |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
131 target) |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
132 |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
133 In order to run the sample, you may serve it with the ServeFolders plugin. |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
134 You can i.e: add such a section in your orthanc configuration file: |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
135 |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
136 ``` |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
137 { |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
138 "Plugins" : ["LibServeFolders.so], |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
139 "ServeFolders" : { |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
140 "/rt-viewer" : "..../out/install-stone-wasm-RtViewer-RelWithDebInfo" |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
141 } |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
142 } |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
143 ``` |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
144 |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
145 You'll then be able to open the demo at `http://localhost:8042/rt-viewer/index.html` |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
146 |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
147 |
1527
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
148 RtViewerPlugin |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
149 --------------- |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
150 This C++ plugin allows to extend the Orthanc Explorer to add a button labeled "Stone RT Viewer" |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
151 in the series page. |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
152 |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
153 It also embeds and serves the RT Viewer files and is thus a standalone way of using this viewer. |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
154 |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
155 Please note that building this plugin requires that the RtViewer be built inside the wasm-binaries |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
156 folder of the repo. |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
157 |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
158 This will automatically be the case if you use the `<REPO-ROOT>/OrthancStone/Samples/WebAssembly/docker-build.sh` script. |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
159 |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
160 If you use the `build-wasm-samples.sh` script above, you will have the copy `RtViewer` **folder** |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
161 from `<REPO-ROOT>/out/install-stone-wasm-RtViewer-RelWithDebInfo` to `<REPO-ROOT>/wasm-binaries/`. |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
162 |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
163 TL;DR: Build like this (assuming `~/orthanc-stone` is the repo ): |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
164 |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
165 ``` |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
166 ~/orthanc-stone/OrthancStone/Samples/WebAssembly/docker-build.sh |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
167 ~/orthanc-stone/OrthancStone/Samples/RtViewerPlugin/docker-build.sh |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
168 ``` |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
169 |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
170 Once this is done, the plugin can be found in: |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
171 |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
172 ``` |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
173 ~/orthanc-stone/wasm-binaries/share/orthanc/plugins/libRtViewerPlugin.so |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
174 ``` |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
175 |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
176 Add this path to the `"Plugins"` section of your Orthanc configuration, start Orthanc, and you |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
177 should now see a "Stone MPR RT Viewer" button in the Orthanc Explorer, at the *series* level. |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
178 |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
179 Open it on a CT series, and the RTSTRUCT and RTDOSE series of the same study will be loaded in |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
180 the viewer. |
4c4b267e4004
RtViewerPlugin : similar to the StoneWebPlugin, but for the sole RtViewer sample
Benjamin Golinvaux <bgo@osimis.io>
parents:
1521
diff
changeset
|
181 |
1378 | 182 Native samples |
183 ================= | |
184 | |
185 ### Windows build | |
186 | |
187 Here's how to build the SdlSimpleViewer example using Visual Studio 2019 | |
188 (the shell is Powershell, but the legacy shell can also be used with some | |
189 tweaks). This example is meant to be launched from the folder above | |
190 orthanc-stone. | |
191 | |
192 ``` | |
193 # create the build folder and navigate to it | |
194 $buildDir = "build-stone-sdlviewer-msvc16-x64" | |
195 | |
196 if (-not (Test-Path $buildDir)) { | |
197 mkdir -p $buildDir | Out-Null | |
198 } | |
199 | |
200 cd $buildDir | |
201 | |
202 # perform the configuration | |
203 cmake -G "Visual Studio 16 2019" -A x64 ` | |
204 -DMSVC_MULTIPLE_PROCESSES=ON ` | |
205 -DALLOW_DOWNLOADS=ON ` | |
206 -DSTATIC_BUILD=ON ` | |
207 -DOPENSSL_NO_CAPIENG=ON ` | |
1521
bc4c50a53bd3
changed a few remaining instances of orthanc-stone/Samples to orthanc-stone/OrthancStone/Samples
Benjamin Golinvaux <bgo@osimis.io>
parents:
1517
diff
changeset
|
208 ../orthanc-stone/OrthancStone/Samples/Sdl |
1378 | 209 |
210 $solutionPath = ls -filter *.sln | |
211 Write-Host "Solution file(s) available at: $solutionPath" | |
212 ``` | |
213 | |
214 The initial configuration step will be quite lengthy, for CMake needs to | |
215 setup its internal cache based on your environment and build tools. | |
216 | |
217 Subsequent runs will be several orders of magnitude faster! | |
218 | |
219 One the solution (.sln) file is ready, you can open it using the Visual Studio | |
220 IDE and choose Build --> Build solution. | |
221 | |
222 An alternative is to execute `cmake --build .` in the build folder created by | |
223 the script. | |
224 | |
1395
62dc0d737e7b
build script for wasm sample + updated instructions + fixed Sdl sample for Orthanc listening on other ports that 8042
Alain Mazy <alain@mazy.be>
parents:
1378
diff
changeset
|
225 In order to run the sample, make sure you've an Orthanc server running i.e. on |
62dc0d737e7b
build script for wasm sample + updated instructions + fixed Sdl sample for Orthanc listening on other ports that 8042
Alain Mazy <alain@mazy.be>
parents:
1378
diff
changeset
|
226 port 8042 and launch: |
62dc0d737e7b
build script for wasm sample + updated instructions + fixed Sdl sample for Orthanc listening on other ports that 8042
Alain Mazy <alain@mazy.be>
parents:
1378
diff
changeset
|
227 |
62dc0d737e7b
build script for wasm sample + updated instructions + fixed Sdl sample for Orthanc listening on other ports that 8042
Alain Mazy <alain@mazy.be>
parents:
1378
diff
changeset
|
228 ``` |
1419
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
229 ./SdlSimpleViewer --orthanc http://localhost:8042 --instance 7fc84013-abef174e-3354ca83-b9cdb2a4-f1a74368 |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
230 |
f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
Alain Mazy <alain@mazy.be>
parents:
1406
diff
changeset
|
231 ./RtViewerSdl --orthanc http://localhost:8042 --ctseries a04ecf01-79b2fc33-58239f7e-ad9db983-28e81afa --rtdose 830a69ff-8e4b5ee3-b7f966c8-bccc20fb-d322dceb --rtstruct 54460695-ba3885ee-ddf61ac0-f028e31d-a6e474d9 |
1395
62dc0d737e7b
build script for wasm sample + updated instructions + fixed Sdl sample for Orthanc listening on other ports that 8042
Alain Mazy <alain@mazy.be>
parents:
1378
diff
changeset
|
232 ``` |
1406
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
233 |
1744 | 234 |
1406
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
235 RtViewer |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
236 --------------- |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
237 |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
238 ### Windows build |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
239 |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
240 Here's how to build the SdlSimpleViewer example using Visual Studio 2019 |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
241 (the shell is Powershell, but the legacy shell can also be used with some |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
242 tweaks). This example is meant to be launched from the folder above |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
243 orthanc-stone. |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
244 |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
245 ``` |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
246 $buildRootDir = "out" |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
247 $buildDirName = "build-stone-sdl-RtViewer-msvc16-x64" |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
248 $buildDir = Join-Path -Path $buildRootDir -ChildPath $buildDirName |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
249 |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
250 if (-not (Test-Path $buildDir)) { |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
251 mkdir -p $buildDir | Out-Null |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
252 } |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
253 |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
254 cd $buildDir |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
255 |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
256 cmake -G "Visual Studio 16 2019" -A x64 ` |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
257 -DMSVC_MULTIPLE_PROCESSES=ON ` |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
258 -DALLOW_DOWNLOADS=ON ` |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
259 -DSTATIC_BUILD=ON ` |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
260 -DOPENSSL_NO_CAPIENG=ON ` |
1521
bc4c50a53bd3
changed a few remaining instances of orthanc-stone/Samples to orthanc-stone/OrthancStone/Samples
Benjamin Golinvaux <bgo@osimis.io>
parents:
1517
diff
changeset
|
261 ../../orthanc-stone/OrthancStone/Samples/Sdl/RtViewer |
1406
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
262 ``` |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
263 |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
264 Executing `cmake --build .` in the build folder will launch the Microsoft |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
265 builder on the solution. |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
266 |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
267 Alternatively, you can open and build the solution using Visual Studio 2019. |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1395
diff
changeset
|
268 |