Mercurial > hg > orthanc-stone
comparison Samples/README.md @ 1419:f5493e5a51a3
single CMakeLists.txt for all SDL samples & unit tests + another one for all Wasm samples
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Wed, 13 May 2020 12:42:52 +0200 |
parents | 5d7ee14dc1eb |
children |
comparison
equal
deleted
inserted
replaced
1415:998697c5ec74 | 1419:f5493e5a51a3 |
---|---|
27 | 27 |
28 When Dicom resources are to be displayed, their IDs can be supplied in the | 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 | 29 various ways suitable for the platform (command-line arguments, URL parameters |
30 or through the GUI) | 30 or through the GUI) |
31 | 31 |
32 | |
33 This repo contains two sample projects: | |
34 | |
35 SingleFrameViewer | |
36 ----------------- | |
37 | |
38 This sample application displays a single frame of a Dicom instance that can | |
39 be loaded from Orthanc, either by using the Orthanc REST API or through the | |
40 Dicomweb server functionality of Orthanc. | |
41 | |
42 RtViewer | |
43 -------- | |
44 | |
45 This sample application displays set of Radiotherapy data: | |
46 - a CT scan | |
47 - an RT-Dose | |
48 - an RT-Struct | |
49 | |
50 The WebAssembly version displays 3 viewports with MPR data | |
51 while the SDL sample displays a single viewport. | |
52 | |
32 | 53 |
33 WebAssembly samples | 54 WebAssembly samples |
34 =================== | 55 =================== |
35 | 56 |
36 Building the WebAssembly samples require the Emscripten SDK | 57 Building the WebAssembly samples require the Emscripten SDK |
56 sudo apt-get update | 77 sudo apt-get update |
57 sudo apt-get install -y build-essential curl wget git python cmake pkg-config | 78 sudo apt-get install -y build-essential curl wget git python cmake pkg-config |
58 sudo apt-get install -y mercurial unzip npm ninja-build p7zip-full gettext-base | 79 sudo apt-get install -y mercurial unzip npm ninja-build p7zip-full gettext-base |
59 ``` | 80 ``` |
60 | 81 |
61 SingleFrameViewer | 82 To build the Wasm samples, just launch the `build-wasm-samples.sh` script from |
62 ----------------- | |
63 | |
64 This sample application displays a single frame of a Dicom instance that can | |
65 be loaded from Orthanc, either by using the Orthanc REST API or through the | |
66 Dicomweb server functionality of Orthanc. | |
67 | |
68 This barebones sample uses plain Javascript and requires the | |
69 Emscripten toolchain and cmake, in addition to a few standard packages. | |
70 | |
71 To build it, just launch the `build-wasm-SingleFrameViewer.sh` script from | |
72 this folder. Optionaly, you can pass the build type as an argument. | 83 this folder. Optionaly, you can pass the build type as an argument. |
73 We suggest that you do *not* use the `Debug` configuration unless you really | 84 We suggest that you do *not* use the `Debug` configuration unless you really |
74 need it, for the additional checks that are made will lead to a very long | 85 need it, for the additional checks that are made will lead to a very long |
75 build time and much slower execution (more severe than with a native non-wasm | 86 build time and much slower execution (more severe than with a native non-wasm |
76 target) | 87 target) |
80 | 91 |
81 ``` | 92 ``` |
82 { | 93 { |
83 "Plugins" : ["LibServeFolders.so], | 94 "Plugins" : ["LibServeFolders.so], |
84 "ServeFolders" : { | 95 "ServeFolders" : { |
85 "/single-frame-viewer" : "..../out/install-stone-wasm-SingleFrameViewer-RelWithDebInfo" | 96 "/single-frame-viewer" : "..../out/install-stone-wasm-samples-RelWithDebInfo/SingleFrameViewer", |
97 "/rt-viewer": "..../out/install-stone-wasm-samples-RelWithDebInfo/RtViewer" | |
86 } | 98 } |
87 } | 99 } |
88 ``` | 100 ``` |
89 | 101 |
90 You'll then be able to open the demo at `http://localhost:8042/single-frame-viewer/index.html` | 102 You'll then be able to open the single-frame-viewer demo at `http://localhost:8042/single-frame-viewer/index.html` |
103 | |
104 The rt-viewer demo at | |
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: | |
106 | |
107 - the CT series Orthanc ID | |
108 - the RT-Dose instance Orthanc ID | |
109 - the RT-Struct instance Orthanc ID | |
91 | 110 |
92 | 111 |
93 RtViewer | 112 RtViewer |
94 ----------------- | 113 ----------------- |
95 | 114 |
127 | 146 |
128 | 147 |
129 Native samples | 148 Native samples |
130 ================= | 149 ================= |
131 | 150 |
132 SdlSimpleViewer | |
133 --------------- | |
134 | |
135 ### Windows build | 151 ### Windows build |
136 | 152 |
137 Here's how to build the SdlSimpleViewer example using Visual Studio 2019 | 153 Here's how to build the SdlSimpleViewer example using Visual Studio 2019 |
138 (the shell is Powershell, but the legacy shell can also be used with some | 154 (the shell is Powershell, but the legacy shell can also be used with some |
139 tweaks). This example is meant to be launched from the folder above | 155 tweaks). This example is meant to be launched from the folder above |
153 cmake -G "Visual Studio 16 2019" -A x64 ` | 169 cmake -G "Visual Studio 16 2019" -A x64 ` |
154 -DMSVC_MULTIPLE_PROCESSES=ON ` | 170 -DMSVC_MULTIPLE_PROCESSES=ON ` |
155 -DALLOW_DOWNLOADS=ON ` | 171 -DALLOW_DOWNLOADS=ON ` |
156 -DSTATIC_BUILD=ON ` | 172 -DSTATIC_BUILD=ON ` |
157 -DOPENSSL_NO_CAPIENG=ON ` | 173 -DOPENSSL_NO_CAPIENG=ON ` |
158 ../orthanc-stone/Samples/Sdl/SimpleViewer | 174 ../orthanc-stone/Samples/Sdl |
159 | 175 |
160 $solutionPath = ls -filter *.sln | 176 $solutionPath = ls -filter *.sln |
161 Write-Host "Solution file(s) available at: $solutionPath" | 177 Write-Host "Solution file(s) available at: $solutionPath" |
162 ``` | 178 ``` |
163 | 179 |
174 | 190 |
175 In order to run the sample, make sure you've an Orthanc server running i.e. on | 191 In order to run the sample, make sure you've an Orthanc server running i.e. on |
176 port 8042 and launch: | 192 port 8042 and launch: |
177 | 193 |
178 ``` | 194 ``` |
179 ./SingleFrameViewer --orthanc http://localhost:8042 --instance 7fc84013-abef174e-3354ca83-b9cdb2a4-f1a74368 | 195 ./SdlSimpleViewer --orthanc http://localhost:8042 --instance 7fc84013-abef174e-3354ca83-b9cdb2a4-f1a74368 |
196 | |
197 ./RtViewerSdl --orthanc http://localhost:8042 --ctseries a04ecf01-79b2fc33-58239f7e-ad9db983-28e81afa --rtdose 830a69ff-8e4b5ee3-b7f966c8-bccc20fb-d322dceb --rtstruct 54460695-ba3885ee-ddf61ac0-f028e31d-a6e474d9 | |
180 ``` | 198 ``` |
181 | 199 |
182 RtViewer | 200 RtViewer |
183 --------------- | 201 --------------- |
184 | 202 |