Mercurial > hg > orthanc-stone
annotate README.md @ 571:a29f9628369e
fix build on visual studio 2008
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 18 Apr 2019 16:34:25 +0200 |
parents | d10a295b607a |
children | e3f21a265be5 69370bdaad89 |
rev | line source |
---|---|
0 | 1 Stone of Orthanc |
2 ================ | |
3 | |
4 General Information | |
5 ------------------- | |
6 | |
7 This repository contains the source code of the Stone of Orthanc. | |
8 | |
9 Stone of Orthanc is a lightweight, cross-platform C++ framework for | |
10 the CPU-based rendering of medical images. It notably features support | |
11 for MPR (multiplanar reconstruction of volume images), PET-CT fusion, | |
12 and accurate physical world coordinates. | |
13 | |
14 Stone of Orthanc comes bundled with its own software-based rendering | |
15 engine (based upon pixman). This engine will use CPU hardware | |
16 acceleration if available (notably SSE2, SSSE3, and NEON instruction | |
17 sets), but not the GPU. This makes Stone a highly versatile framework | |
9 | 18 that can run even on low-performance platforms. Note that Stone is |
19 able to display DICOM series without having to entirely store them in | |
20 the RAM (i.e. frame by frame). | |
21 | |
22 Thanks to its standalone rendering engine, Stone of Orthanc is also | |
23 compatible with any GUI framework (such as Qt, wxWidgets, MFC...). The | |
24 provided sample applications use the SDL framework. | |
0 | 25 |
9 | 26 Stone is conceived as a companion toolbox to the Orthanc VNA (vendor |
27 neutral archive, i.e. DICOM server). As a consequence, Stone will | |
28 smoothly interface with Orthanc out of the box. Interestingly, Stone | |
29 does not contain any DICOM toolkit: It entirely relies on the REST API | |
30 of Orthanc to parse/decode DICOM images. However, thanks to the | |
31 object-oriented architecture of Stone, it is possible to avoid this | |
32 dependency upon Orthanc, e.g. to download DICOM datasets using | |
33 DICOMweb. | |
0 | 34 |
35 | |
36 Comparison | |
37 ---------- | |
38 | |
39 Pay attention to the fact that Stone of Orthanc is a toolkit, and not | |
1 | 40 a fully-featured application for the visualization of medical images |
41 (such as Horos/OsiriX or Ginkgo CADx). However, such applications | |
445 | 42 can be built on the top of Stone of Orthanc. |
0 | 43 |
44 Stone of Orthanc is quite similar to two other well-known toolkits: | |
45 | |
46 * Cornerstone, a client-side JavaScript toolkit to display medical | |
47 images in Web browsers, by Chris Hafey <chafey@gmail.com>: | |
48 https://github.com/chafey/cornerstone | |
49 | |
50 Contrarily to Cornerstone, Stone of Orthanc can be embedded into | |
51 native, heavyweight applications. | |
52 | |
53 * VTK, a C++ toolkit for scientific visualization, by Kitware: | |
54 http://www.vtk.org/ | |
55 | |
56 Contrarily to VTK, Stone of Orthanc is focused on CPU-based, 2D | |
57 rendering: The GPU will not be used. | |
58 | |
59 | |
60 Dependencies | |
61 ------------ | |
62 | |
63 Stone of Orthanc is based upon the following projects: | |
64 | |
65 * Orthanc, a lightweight Vendor Neutral Archive (DICOM server): | |
66 http://www.orthanc-server.com/ | |
67 | |
68 * Cairo and pixman, a cross-platform 2D graphics library: | |
69 https://www.cairographics.org/ | |
70 | |
71 * Optionally, SDL, a cross-platform multimedia library: | |
72 https://www.libsdl.org/ | |
73 | |
445 | 74 Prerequisites to compile natively on Ubuntu: |
222 | 75 ``` |
76 sudo apt-get install -y libcairo-dev libpixman-1-dev libsdl2-dev | |
77 ``` | |
0 | 78 |
445 | 79 The emscripten SDK is required for the WASM build. Please install it |
80 in `~/apps/emsdk`. If you wish to use it in another way, please edit | |
81 the `build-wasm.sh` file. | |
82 | |
466
5055031f4a06
- Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents:
445
diff
changeset
|
83 ninja (`sudo apt-get install -y ninja-build`) is used instead of make, for performance reasons. |
5055031f4a06
- Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents:
445
diff
changeset
|
84 |
445 | 85 Installation and usage ---------------------- |
0 | 86 |
87 Build instructions are similar to that of Orthanc: | |
460 | 88 http://book.orthanc-server.com/faq/compiling.html |
0 | 89 |
41 | 90 Usage details are available as part of the Orthanc Book: |
91 http://book.orthanc-server.com/developers/stone.html | |
92 | |
0 | 93 Stone of Orthanc comes with several sample applications in the |
445 | 94 `Samples` folder. These samples can be compiled into Web Assembly or |
95 into native SDL applications. | |
264
6b98ac45aaee
documented how to compile and execute WASM samples
am@osimis.io
parents:
222
diff
changeset
|
96 |
445 | 97 The following assumes that the source code to be downloaded in |
98 `~/orthanc-stone` and Orthanc source code to be checked out in | |
99 `~/orthanc`. | |
100 | |
101 Building the WASM samples | |
102 ------------------------------------- | |
264
6b98ac45aaee
documented how to compile and execute WASM samples
am@osimis.io
parents:
222
diff
changeset
|
103 ``` |
295
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
265
diff
changeset
|
104 cd ~/orthanc-stone/Applications/Samples |
264
6b98ac45aaee
documented how to compile and execute WASM samples
am@osimis.io
parents:
222
diff
changeset
|
105 ./build-wasm.sh |
6b98ac45aaee
documented how to compile and execute WASM samples
am@osimis.io
parents:
222
diff
changeset
|
106 ``` |
6b98ac45aaee
documented how to compile and execute WASM samples
am@osimis.io
parents:
222
diff
changeset
|
107 |
445 | 108 Serving the WASM samples |
109 ------------------------------------ | |
264
6b98ac45aaee
documented how to compile and execute WASM samples
am@osimis.io
parents:
222
diff
changeset
|
110 ``` |
6b98ac45aaee
documented how to compile and execute WASM samples
am@osimis.io
parents:
222
diff
changeset
|
111 # launch an Orthanc listening on 8042 port: |
6b98ac45aaee
documented how to compile and execute WASM samples
am@osimis.io
parents:
222
diff
changeset
|
112 Orthanc |
6b98ac45aaee
documented how to compile and execute WASM samples
am@osimis.io
parents:
222
diff
changeset
|
113 |
445 | 114 # launch an nginx that will serve the WASM static files and reverse |
115 # proxy | |
264
6b98ac45aaee
documented how to compile and execute WASM samples
am@osimis.io
parents:
222
diff
changeset
|
116 sudo nginx -p $(pwd) -c nginx.local.conf |
6b98ac45aaee
documented how to compile and execute WASM samples
am@osimis.io
parents:
222
diff
changeset
|
117 ``` |
445 | 118 |
119 You can now open the samples in http://localhost:9977 | |
0 | 120 |
445 | 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 | |
527
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
506
diff
changeset
|
128 **Simple make generator with dynamic build** |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
506
diff
changeset
|
129 |
265 | 130 ``` |
527
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
506
diff
changeset
|
131 # Please set $currentDir to the current folder |
265 | 132 mkdir -p ~/builds/orthanc-stone-build |
133 cd ~/builds/orthanc-stone-build | |
445 | 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 | |
548
d10a295b607a
Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
140 **Ninja generator with static SDL build (pwsh script)** |
527
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
506
diff
changeset
|
141 |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
506
diff
changeset
|
142 ``` |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
506
diff
changeset
|
143 # Please yourself one level above the orthanc-stone and orthanc folders |
548
d10a295b607a
Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
144 if( -not (test-path stone_build_sdl)) { mkdir stone_build_sdl } |
527
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
506
diff
changeset
|
145 cd stone_build_sdl |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
506
diff
changeset
|
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/ |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
506
diff
changeset
|
147 ``` |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
506
diff
changeset
|
148 |
548
d10a295b607a
Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
149 **Visual Studio 2017 generator with static SDL build (pwsh script)** |
d10a295b607a
Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
150 |
d10a295b607a
Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
151 ``` |
d10a295b607a
Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
152 # The following will use Visual Studio 2017 to build the SDL samples |
d10a295b607a
Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
153 # in debug mode (with multiple compilers in parallel). NOTE: place |
d10a295b607a
Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
154 # yourself one level above the `orthanc-stone` and `orthanc` folders |
d10a295b607a
Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
155 |
d10a295b607a
Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
156 if( -not (test-path stone_build_sdl)) { mkdir stone_build_sdl } |
d10a295b607a
Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
157 cd stone_build_sdl |
d10a295b607a
Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
158 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/ |
d10a295b607a
Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
159 cmake --build . --config Debug |
d10a295b607a
Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
160 ``` |
527
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
506
diff
changeset
|
161 |
445 | 162 If you are working on Windows, add the correct generator option to |
163 cmake to, for instance, generate msbuild files for Visual Studio. | |
164 | |
165 Then, under Linux: | |
166 ``` | |
265 | 167 cmake --build . --target OrthancStoneSimpleViewer -- -j 5 |
168 ``` | |
169 | |
445 | 170 Note: replace `$($pwd)` with the current directory when not using Powershell |
171 | |
172 Building the Qt native samples (SimpleViewer only) under Windows: | |
173 ------------------------------------------------------------------ | |
527
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
506
diff
changeset
|
174 |
548
d10a295b607a
Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
175 **Visual Studio 2017 generator with static Qt build (pwsh script)** |
527
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
506
diff
changeset
|
176 |
445 | 177 For instance, if Qt is installed in `C:\Qt\5.12.0\msvc2017_64` |
178 | |
527
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
506
diff
changeset
|
179 ``` |
548
d10a295b607a
Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
180 # The following will use Visual Studio 2017 to build the SDL samples |
d10a295b607a
Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
181 # in debug mode (with multiple compilers in parallel). NOTE: place |
d10a295b607a
Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
182 # yourself one level above the `orthanc-stone` and `orthanc` folders |
d10a295b607a
Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
183 |
d10a295b607a
Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
184 if( -not (test-path stone_build_qt)) { mkdir stone_build_qt } |
d10a295b607a
Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
185 cd stone_build_qt |
d10a295b607a
Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
186 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/ |
d10a295b607a
Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
187 cmake --build . --config Debug |
527
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
506
diff
changeset
|
188 ``` |
445 | 189 |
190 Note: replace `$($pwd)` with the current directory when not using Powershell | |
191 | |
192 | |
501 | 193 |
548
d10a295b607a
Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
194 |
d10a295b607a
Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
195 |
d10a295b607a
Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
196 |
445 | 197 Building the SDL native samples (SimpleViewer only) under Windows: |
198 ------------------------------------------------------------------ | |
199 `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/` | |
200 | |
201 Note: replace `$($pwd)` with the current directory when not using Powershell | |
202 | |
203 Executing the native samples: | |
204 -------------------------------- | |
265 | 205 ``` |
206 # launch an Orthanc listening on 8042 port: | |
207 Orthanc | |
208 | |
209 # launch the sample | |
295
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
265
diff
changeset
|
210 ./OrthancStoneSimpleViewer --studyId=XX |
265 | 211 ``` |
212 | |
0 | 213 Licensing |
214 --------- | |
215 | |
49 | 216 Stone of Orthanc is licensed under the AGPL license. |
0 | 217 |
218 We also kindly ask scientific works and clinical studies that make | |
219 use of Orthanc to cite Orthanc in their associated publications. | |
220 Similarly, we ask open-source and closed-source products that make | |
221 use of Orthanc to warn us about this use. You can cite our work | |
222 using the following BibTeX entry: | |
223 | |
210 | 224 @Article{Jodogne2018, |
225 author="Jodogne, S{\'e}bastien", | |
226 title="The {O}rthanc Ecosystem for Medical Imaging", | |
227 journal="Journal of Digital Imaging", | |
228 year="2018", | |
211 | 229 month="Jun", |
230 day="01", | |
231 volume="31", | |
232 number="3", | |
233 pages="341--352", | |
210 | 234 issn="1618-727X", |
235 doi="10.1007/s10278-018-0082-y", | |
236 url="https://doi.org/10.1007/s10278-018-0082-y" | |
0 | 237 } |
501 | 238 |
527
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
506
diff
changeset
|
239 Various notes to be deleted |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
506
diff
changeset
|
240 --------------------------- |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
506
diff
changeset
|
241 class BaseCommand : public ICommand |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
506
diff
changeset
|
242 |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
506
diff
changeset
|
243 RadiographySceneCommand |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
506
diff
changeset
|
244 GenericNoArgCommand |