Mercurial > hg > orthanc-stone
annotate Applications/StoneWebViewer/BuildInstructions.txt @ 2097:a9e23ef9ee09 dicom-sr
preparing to extract dicom-sr annotations
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 08 Nov 2023 16:31:49 +0100 |
parents | 63587fdeec69 |
children | 5653b6335642 |
rev | line source |
---|---|
1859
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
1 Build & develop instructions |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
2 ============================ |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
3 |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
4 Prerequisites: |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
5 ------------- |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
6 |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
7 - Install the usual build tools to build an Orthanc plugin (a good reference is the orthanc base image Dockerfile): https://github.com/jodogne/OrthancDocker/blob/master/base/Dockerfile |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
8 - Install EMSDK (a good reference is the wasm-builder image Dockerfile): https://github.com/jodogne/OrthancDocker/tree/master/wasm-builder |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
9 |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
10 Create your build environment: |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
11 ----------------------------- |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
12 |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
13 mkdir ~/dev |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
14 cd ~/dev |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
15 hg clone https://hg.orthanc-server.com/orthanc/ |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
16 hg clone https://hg.orthanc-server.com/orthanc-stone/ |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
17 hg clone https://hg.orthanc-server.com/orthanc-dicomweb/ |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
18 mkdir -p ~/dev/build/orthanc |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
19 mkdir -p ~/dev/build/orthanc-dicomweb |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
20 mkdir -p ~/dev/build/wasm-stone-viewer |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
21 mkdir -p ~/dev/build/stone-viewer-plugin |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
22 |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
23 # build orthanc |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
24 cd ~/dev/build/orthanc |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
25 cmake -DCMAKE_BUILD_TYPE=Release -DUSE_SYSTEM_CIVETWEB=OFF -DALLOW_DOWNLOADS=ON ../../orthanc/OrthancServer |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
26 make -j 6 |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
27 |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
28 # build orthanc-dicomweb |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
29 cd ~/dev/build/orthanc-dicomweb |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
30 cmake -DCMAKE_BUILD_TYPE=Release -DSTATIC_BUILD -DALLOW_DOWNLOADS=ON ../../orthanc-dicomweb |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
31 make -j 6 |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
32 |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
33 # build the StoneViewer WASM code |
1862
63587fdeec69
added 'SkipSeriesFromModalities' to ignore series from modality types
Alain Mazy <am@osimis.io>
parents:
1860
diff
changeset
|
34 # note: for fast link time: use -DCMAKE_BUILD_TYPE=RelWithDebInfo. However, this produces an output that is too large to be embedded in the plugin |
63587fdeec69
added 'SkipSeriesFromModalities' to ignore series from modality types
Alain Mazy <am@osimis.io>
parents:
1860
diff
changeset
|
35 # therefore, when you build the plugin, build the WASM code with -DCMAKE_BUILD_TYPE=Release |
1859
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
36 cd ~/dev/build/wasm-stone-viewer |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
37 cmake ../../orthanc-stone/Applications/StoneWebViewer/WebAssembly -DLIBCLANG=/usr/lib/x86_64-linux-gnu/libclang-10.so -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${EMSDK}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DALLOW_DOWNLOADS=ON -G Ninja |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
38 ninja install |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
39 |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
40 # build the StoneViewer Plugin |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
41 cd ~/dev/build/stone-viewer-plugin |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
42 cmake ../../orthanc-stone/Applications/StoneWebViewer/Plugin -DUSE -DCMAKE_BUILD_TYPE=Release -DSTATIC_BUILD=ON -DALLOW_DOWNLOADS=ON |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
43 make -j 6 |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
44 |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
45 |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
46 Updating the code: |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
47 ----------------- |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
48 |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
49 To avoid rebuilding the plugin everytime you update the HTML/CSS/JS or C++ code from the WebAssembly, you can use the ServeFolders plugin |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
50 to host this part of the code. Here's a sample configuration file that works well for StoneViewer development: |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
51 |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
52 { |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
53 "AuthenticationEnabled": false, |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
54 "HttpPort": 8043, |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
55 "Plugins": [ |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
56 "/home/alain/dev/build/stone-viewer-plugin/libStoneWebViewer.so", |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
57 "/home/alain/dev/build/orthanc-dicomweb/libOrthancDicomWeb.so", |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
58 "/home/alain/dev/build/orthanc/libServeFolders.so" |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
59 ], |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
60 |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
61 "ServeFolders": { |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
62 "/stone-webviewer-live" : "/home/alain/o/orthanc-stone/wasm-binaries/StoneWebViewer/" |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
63 } |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
64 } |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
65 |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
66 Everytime you modify the HTML/CSS/JS or C++ code from the WebAssembly, you don't need to restart Orthanc and can simply run |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
67 cd ~/dev/build/wasm-stone-viewer && ninja install |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
68 Then, the viewer is available on http://localhost:8043/stone-webviewer-live/index.html?study=1.2.3.4.5 |
58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
69 |
1860
b8f54ab47b3b
SeriesList: display the SeriesNumber tag in front of image count.
Alain Mazy <am@osimis.io>
parents:
1859
diff
changeset
|
70 If you modify the plugin code, you must of course rebuild the plugin and restart Orthanc |
b8f54ab47b3b
SeriesList: display the SeriesNumber tag in front of image count.
Alain Mazy <am@osimis.io>
parents:
1859
diff
changeset
|
71 |
b8f54ab47b3b
SeriesList: display the SeriesNumber tag in front of image count.
Alain Mazy <am@osimis.io>
parents:
1859
diff
changeset
|
72 If you modify the scss files, you'll need to run: |
b8f54ab47b3b
SeriesList: display the SeriesNumber tag in front of image count.
Alain Mazy <am@osimis.io>
parents:
1859
diff
changeset
|
73 - Applications/StoneWebViewer/Resources$ ./node_modules/node-sass/bin/node-sass ./Styles/styles.scss > ../WebApplication/app.css as explained in Applications/StoneWebViewer/Resources/Styles.txt |