Mercurial > hg > orthanc-stone
comparison README.md @ 1381:f4a06ad1580b
Branch broker is now the new default
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Wed, 22 Apr 2020 14:05:47 +0200 |
parents | c53a4667f895 |
children | 0cbc85e0c583 |
comparison
equal
deleted
inserted
replaced
1375:4431ffdcc2a4 | 1381:f4a06ad1580b |
---|---|
89 | 89 |
90 Usage details are available as part of the Orthanc Book: | 90 Usage details are available as part of the Orthanc Book: |
91 http://book.orthanc-server.com/developers/stone.html | 91 http://book.orthanc-server.com/developers/stone.html |
92 | 92 |
93 Stone of Orthanc comes with several sample applications in the | 93 Stone of Orthanc comes with several sample applications in the |
94 `Samples` folder. These samples can be compiled into Web Assembly or | 94 `Samples` folder. |
95 into native SDL applications. | |
96 | 95 |
97 The following assumes that the source code to be downloaded in | 96 Please see the Samples/README.md file for information on the samples building |
98 `~/orthanc-stone` and Orthanc source code to be checked out in | 97 and running procedure. |
99 `~/orthanc`. | |
100 | 98 |
101 Building the WASM samples | |
102 ------------------------------------- | |
103 ``` | |
104 cd ~/orthanc-stone/Applications/Samples | |
105 ./build-wasm.sh | |
106 ``` | |
107 | |
108 Serving the WASM samples | |
109 ------------------------------------ | |
110 ``` | |
111 # launch an Orthanc listening on 8042 port: | |
112 Orthanc | |
113 | |
114 # launch an nginx that will serve the WASM static files and reverse | |
115 # proxy | |
116 sudo nginx -p $(pwd) -c nginx.local.conf | |
117 ``` | |
118 | |
119 You can now open the samples in http://localhost:9977 | |
120 | |
121 Building the SDL native samples (SimpleViewer only) | |
122 --------------------------------------------------- | |
123 | |
124 The following also assumes that you have checked out the Orthanc | |
125 source code in an `orthanc` folder next to the Stone of Orthanc | |
126 repository, please enter the following: | |
127 | |
128 **Simple make generator with dynamic build** | |
129 | |
130 ``` | |
131 # Please set $currentDir to the current folder | |
132 mkdir -p ~/builds/orthanc-stone-build | |
133 cd ~/builds/orthanc-stone-build | |
134 cmake -DORTHANC_FRAMEWORK_SOURCE=path \ | |
135 -DORTHANC_FRAMEWORK_ROOT=$currentDir/../../../orthanc \ | |
136 -DALLOW_DOWNLOADS=ON -DENABLE_SDL=ON \ | |
137 ~/orthanc-stone/Applications/Samples/ | |
138 ``` | |
139 | |
140 **Ninja generator with static SDL build (pwsh script)** | |
141 | |
142 ``` | |
143 # Please yourself one level above the orthanc-stone and orthanc folders | |
144 if( -not (test-path stone_build_sdl)) { mkdir stone_build_sdl } | |
145 cd stone_build_sdl | |
146 cmake -G Ninja -DSTATIC_BUILD=ON -DOPENSSL_NO_CAPIENG=ON -DORTHANC_FRAMEWORK_SOURCE=path -DORTHANC_FRAMEWORK_ROOT="$($pwd)\..\orthanc" -DALLOW_DOWNLOADS=ON -DENABLE_SDL=ON ../orthanc-stone/Applications/Samples/ | |
147 ``` | |
148 | |
149 **Ninja generator with static SDL build (bash/zsh script)** | |
150 | |
151 ``` | |
152 # Please yourself one level above the orthanc-stone and orthanc folders | |
153 if( -not (test-path stone_build_sdl)) { mkdir stone_build_sdl } | |
154 cd stone_build_sdl | |
155 cmake -G Ninja -DSTATIC_BUILD=ON -DOPENSSL_NO_CAPIENG=ON -DORTHANC_FRAMEWORK_SOURCE=path -DORTHANC_FRAMEWORK_ROOT="`pwd`/../orthanc" -DALLOW_DOWNLOADS=ON -DENABLE_SDL=ON ../orthanc-stone/Applications/Samples/ | |
156 ``` | |
157 | |
158 **Visual Studio 2017 generator with static SDL build (pwsh script)** | |
159 | |
160 ``` | |
161 # The following will use Visual Studio 2017 to build the SDL samples | |
162 # in debug mode (with multiple compilers in parallel). NOTE: place | |
163 # yourself one level above the `orthanc-stone` and `orthanc` folders | |
164 | |
165 if( -not (test-path stone_build_sdl)) { mkdir stone_build_sdl } | |
166 cd stone_build_sdl | |
167 cmake -G "Visual Studio 15 2017 Win64" -DMSVC_MULTIPLE_PROCESSES=ON -DSTATIC_BUILD=ON -DOPENSSL_NO_CAPIENG=ON -DORTHANC_FRAMEWORK_SOURCE=path -DORTHANC_FRAMEWORK_ROOT="$($pwd)\..\orthanc" -DALLOW_DOWNLOADS=ON -DENABLE_SDL=ON ../orthanc-stone/Applications/Samples/ | |
168 cmake --build . --config Debug | |
169 ``` | |
170 | |
171 If you are working on Windows, add the correct generator option to | |
172 cmake to, for instance, generate msbuild files for Visual Studio. | |
173 | |
174 Then, under Linux: | |
175 ``` | |
176 cmake --build . --target OrthancStoneSimpleViewer -- -j 5 | |
177 ``` | |
178 | |
179 Note: replace `$($pwd)` with the current directory when not using Powershell | |
180 | |
181 Building the Qt native samples (SimpleViewer only) under Windows: | |
182 ------------------------------------------------------------------ | |
183 | |
184 **Visual Studio 2017 generator with static Qt build (pwsh script)** | |
185 | |
186 For instance, if Qt is installed in `C:\Qt\5.12.0\msvc2017_64` | |
187 | |
188 ``` | |
189 # The following will use Visual Studio 2017 to build the SDL samples | |
190 # in debug mode (with multiple compilers in parallel). NOTE: place | |
191 # yourself one level above the `orthanc-stone` and `orthanc` folders | |
192 | |
193 if( -not (test-path stone_build_qt)) { mkdir stone_build_qt } | |
194 cd stone_build_qt | |
195 cmake -G "Visual Studio 15 2017 Win64" -DMSVC_MULTIPLE_PROCESSES=ON -DSTATIC_BUILD=ON -DOPENSSL_NO_CAPIENG=ON -DCMAKE_PREFIX_PATH=C:\Qt\5.12.0\msvc2017_64 -DORTHANC_FRAMEWORK_SOURCE=path -DORTHANC_FRAMEWORK_ROOT="$($pwd)\..\orthanc" -DALLOW_DOWNLOADS=ON -DENABLE_QT=ON ../orthanc-stone/Applications/Samples/ | |
196 cmake --build . --config Debug | |
197 ``` | |
198 | |
199 Note: replace `$($pwd)` with the current directory when not using Powershell | |
200 | |
201 | |
202 | |
203 | |
204 | |
205 | |
206 Building the SDL native samples (SimpleViewer only) under Windows: | |
207 ------------------------------------------------------------------ | |
208 `cmake -DSTATIC_BUILD=ON -DORTHANC_FRAMEWORK_SOURCE=path -DORTHANC_FRAMEWORK_ROOT="$($pwd)\..\orthanc" -DALLOW_DOWNLOADS=ON -DENABLE_SDL=ON -G "Visual Studio 15 2017 Win64" ../orthanc-stone/Applications/Samples/` | |
209 | |
210 Note: replace `$($pwd)` with the current directory when not using Powershell | |
211 | |
212 Executing the native samples: | |
213 -------------------------------- | |
214 ``` | |
215 # launch an Orthanc listening on 8042 port: | |
216 Orthanc | |
217 | |
218 # launch the sample | |
219 ./OrthancStoneSimpleViewer --studyId=XX | |
220 ``` | |
221 | 99 |
222 Licensing | 100 Licensing |
223 --------- | 101 --------- |
224 | 102 |
225 Stone of Orthanc is licensed under the AGPL license. | 103 Stone of Orthanc is licensed under the AGPL license. |
243 issn="1618-727X", | 121 issn="1618-727X", |
244 doi="10.1007/s10278-018-0082-y", | 122 doi="10.1007/s10278-018-0082-y", |
245 url="https://doi.org/10.1007/s10278-018-0082-y" | 123 url="https://doi.org/10.1007/s10278-018-0082-y" |
246 } | 124 } |
247 | 125 |
248 Build the Application Samples | |
249 ----------------------------- | |
250 | |
251 **Visual Studio 2008 (v90) ** | |
252 | |
253 ``` | |
254 cmake -G "Visual Studio 9 2008" -DUSE_LEGACY_JSONCPP=ON -DENABLE_OPENGL=ON -DSTATIC_BUILD=ON -DOPENSSL_NO_CAPIENG=ON -DORTHANC_FRAMEWORK_SOURCE=path -DORTHANC_FRAMEWORK_ROOT="$($pwd)\..\orthanc" -DALLOW_DOWNLOADS=ON -DENABLE_SDL=ON ../orthanc-stone/Applications/Samples | |
255 ``` | |
256 | |
257 **Visual Studio 2019 (v142) ** | |
258 | |
259 ``` | |
260 cmake -G "Visual Studio 16 2019" -A x64 -DMSVC_MULTIPLE_PROCESSES=ON -DENABLE_OPENGL=ON -DSTATIC_BUILD=ON -DOPENSSL_NO_CAPIENG=ON -DORTHANC_FRAMEWORK_SOURCE=path -DORTHANC_FRAMEWORK_ROOT="$($pwd)\..\orthanc" -DALLOW_DOWNLOADS=ON -DENABLE_SDL=ON ../orthanc-stone/Applications/Samples | |
261 ``` | |
262 | |
263 **Visual Studio 2017 (v140) ** | |
264 | |
265 ``` | |
266 cmake -G "Visual Studio 15 2017 Win64" -DMSVC_MULTIPLE_PROCESSES=ON -DENABLE_OPENGL=ON -DSTATIC_BUILD=ON -DOPENSSL_NO_CAPIENG=ON -DORTHANC_FRAMEWORK_SOURCE=path -DORTHANC_FRAMEWORK_ROOT="$($pwd)\..\orthanc" -DALLOW_DOWNLOADS=ON -DENABLE_SDL=ON ../orthanc-stone/Applications/Samples | |
267 ``` | |
268 | |
269 | |
270 Build the core Samples | |
271 --------------------------- | |
272 How to build the newest (2019-04-29) SDL samples under Windows, *inside* a | |
273 folder that is sibling to the orthanc-stone folder: | |
274 | |
275 **Visual Studio 2019 (v142) ** | |
276 | |
277 ``` | |
278 cmake -G "Visual Studio 16 2019" -A x64 -DMSVC_MULTIPLE_PROCESSES=ON -DENABLE_OPENGL=ON -DSTATIC_BUILD=ON -DOPENSSL_NO_CAPIENG=ON -DORTHANC_FRAMEWORK_SOURCE=path -DORTHANC_FRAMEWORK_ROOT="$($pwd)\..\orthanc" -DALLOW_DOWNLOADS=ON -DENABLE_SDL=ON ../orthanc-stone/Samples/Sdl | |
279 ``` | |
280 | |
281 **Visual Studio 2017 (v140) ** | |
282 | |
283 ``` | |
284 cmake -G "Visual Studio 15 2017 Win64" -DMSVC_MULTIPLE_PROCESSES=ON -DENABLE_OPENGL=ON -DSTATIC_BUILD=ON -DOPENSSL_NO_CAPIENG=ON -DORTHANC_FRAMEWORK_SOURCE=path -DORTHANC_FRAMEWORK_ROOT="$($pwd)\..\orthanc" -DALLOW_DOWNLOADS=ON -DENABLE_SDL=ON ../orthanc-stone/Samples/Sdl | |
285 ``` | |
286 | |
287 **Visual Studio 2008 (v90) ** | |
288 | |
289 ``` | |
290 cmake -G "Visual Studio 9 2008" -DUSE_LEGACY_JSONCPP=ON -DENABLE_OPENGL=ON -DSTATIC_BUILD=ON -DOPENSSL_NO_CAPIENG=ON -DORTHANC_FRAMEWORK_SOURCE=path -DORTHANC_FRAMEWORK_ROOT="$($pwd)\..\orthanc" -DALLOW_DOWNLOADS=ON -DENABLE_SDL=ON ../orthanc-stone/Samples/Sdl | |
291 ``` | |
292 | |
293 And under Ubuntu (note the /mnt/c/osi/dev/orthanc folder): | |
294 ``` | |
295 cmake -G "Ninja" -DENABLE_OPENGL=ON -DSTATIC_BUILD=OFF -DOPENSSL_NO_CAPIENG=ON -DORTHANC_FRAMEWORK_SOURCE=path -DORTHANC_FRAMEWORK_ROOT="/mnt/c/osi/dev/orthanc" -DALLOW_DOWNLOADS=ON -DENABLE_SDL=ON ../orthanc-stone/Samples/Sdl | |
296 ``` | |
297 | |
298 TODO trackers: | |
299 - CANCELLED (using outlined text now) text overlay 50% --> ColorTextureLayer 50% | |
300 - DONE angle tracker: draw arcs | |
301 - Handles on arc | |
302 - Select measure tool with hit test --> Delete command | |
303 |