annotate Applications/StoneWebViewer/BuildInstructions.txt @ 1861:9290d2916150

SeriesList: order series by SeriesNumber + hide non displayable series
author Alain Mazy <am@osimis.io>
date Tue, 21 Sep 2021 12:44:40 +0200
parents b8f54ab47b3b
children 63587fdeec69
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
58681a5c727b overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff changeset
34 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
35 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
36 ninja install
58681a5c727b overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff changeset
37
58681a5c727b overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff changeset
38 # 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
39 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
40 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
41 make -j 6
58681a5c727b overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff changeset
42
58681a5c727b overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff changeset
43
58681a5c727b overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff changeset
44 Updating the code:
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
58681a5c727b overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff changeset
47 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
48 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
49
58681a5c727b overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff changeset
50 {
58681a5c727b overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff changeset
51 "AuthenticationEnabled": false,
58681a5c727b overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff changeset
52 "HttpPort": 8043,
58681a5c727b overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff changeset
53 "Plugins": [
58681a5c727b overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff changeset
54 "/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
55 "/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
56 "/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
57 ],
58681a5c727b overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff changeset
58
58681a5c727b overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff changeset
59 "ServeFolders": {
58681a5c727b overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff changeset
60 "/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
61 }
58681a5c727b overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
Alain Mazy <am@osimis.io>
parents:
diff changeset
62 }
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 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
65 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
66 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
67
1860
b8f54ab47b3b SeriesList: display the SeriesNumber tag in front of image count.
Alain Mazy <am@osimis.io>
parents: 1859
diff changeset
68 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
69
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 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
71 - Applications/StoneWebViewer/Resources$ ./node_modules/node-sass/bin/node-sass ./Styles/styles.scss > ../WebApplication/app.css as explained in Applications/StoneWebViewer/Resources/Styles.txt