Mercurial > hg > orthanc-stone
annotate Applications/Samples/Common/RtViewerApp.h @ 1599:73cd85d7da6a
SortedFrames::LookupSopInstanceUid()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 28 Oct 2020 10:55:45 +0100 |
parents | fb5e620430ae |
children | 52b8b96cb55f |
rev | line source |
---|---|
1383
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
1 /** |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
2 * Stone of Orthanc |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
5 * Copyright (C) 2017-2020 Osimis S.A., Belgium |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
6 * |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
7 * This program is free software: you can redistribute it and/or |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
8 * modify it under the terms of the GNU Affero General Public License |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
9 * as published by the Free Software Foundation, either version 3 of |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
10 * the License, or (at your option) any later version. |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
11 * |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
12 * This program is distributed in the hope that it will be useful, but |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
13 * WITHOUT ANY WARRANTY; without even the implied warranty of |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
15 * Affero General Public License for more details. |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
16 * |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
17 * You should have received a copy of the GNU Affero General Public License |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
19 **/ |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
20 |
1393
27e0a00bd3e8
RtViewer SingleFrameViewer OK : wasm SDL single viewport
Benjamin Golinvaux <bgo@osimis.io>
parents:
1386
diff
changeset
|
21 |
1458
828a9b4ee1b7
added missing copyright
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1457
diff
changeset
|
22 #pragma once |
828a9b4ee1b7
added missing copyright
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1457
diff
changeset
|
23 |
1542 | 24 #include "../../../OrthancStone/Sources/Loaders/DicomStructureSetLoader.h" |
25 #include "../../../OrthancStone/Sources/Loaders/ILoadersContext.h" | |
26 #include "../../../OrthancStone/Sources/Loaders/OrthancMultiframeVolumeLoader.h" | |
27 #include "../../../OrthancStone/Sources/Loaders/OrthancSeriesVolumeProgressiveLoader.h" | |
28 #include "../../../OrthancStone/Sources/Messages/IMessageEmitter.h" | |
29 #include "../../../OrthancStone/Sources/Messages/IObserver.h" | |
30 #include "../../../OrthancStone/Sources/Messages/ObserverBase.h" | |
31 #include "../../../OrthancStone/Sources/Oracle/OracleCommandExceptionMessage.h" | |
32 #include "../../../OrthancStone/Sources/Scene2DViewport/ViewportController.h" | |
1560
b4ccd4963d37
fix sdl and wasm samples
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1542
diff
changeset
|
33 #include "../../../OrthancStone/Sources/Viewport/DefaultViewportInteractor.h" |
1542 | 34 #include "../../../OrthancStone/Sources/Viewport/IViewport.h" |
35 #include "../../../OrthancStone/Sources/Volumes/DicomVolumeImage.h" | |
1383
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
36 |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
37 #include <boost/enable_shared_from_this.hpp> |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
38 #include <boost/thread.hpp> |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
39 #include <boost/noncopyable.hpp> |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
40 |
1386
dfb48f0794b1
Ongoing splitting SDL vs WASM (preparing RtViewer WASM)
Benjamin Golinvaux <bgo@osimis.io>
parents:
1383
diff
changeset
|
41 #if ORTHANC_ENABLE_SDL |
1383
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
42 #include <SDL.h> |
1386
dfb48f0794b1
Ongoing splitting SDL vs WASM (preparing RtViewer WASM)
Benjamin Golinvaux <bgo@osimis.io>
parents:
1383
diff
changeset
|
43 #endif |
1383
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
44 |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
45 namespace OrthancStone |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
46 { |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
47 class OpenGLCompositor; |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
48 class IVolumeSlicer; |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
49 class ILayerStyleConfigurator; |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
50 class DicomStructureSetLoader; |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
51 class IOracle; |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
52 class ThreadedOracle; |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
53 class VolumeSceneLayerSource; |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
54 class SdlOpenGLViewport; |
1404
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1393
diff
changeset
|
55 class RtViewerView; |
1383
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
56 |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
57 static const unsigned int FONT_SIZE_0 = 32; |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
58 static const unsigned int FONT_SIZE_1 = 24; |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
59 |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
60 class Scene2D; |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
61 class UndoStack; |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
62 |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
63 /** |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
64 This application subclasses IMessageEmitter to use a mutex before forwarding Oracle messages (that |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
65 can be sent from multiple threads) |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
66 */ |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
67 class RtViewerApp : public ObserverBase<RtViewerApp> |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
68 { |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
69 public: |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
70 |
1386
dfb48f0794b1
Ongoing splitting SDL vs WASM (preparing RtViewer WASM)
Benjamin Golinvaux <bgo@osimis.io>
parents:
1383
diff
changeset
|
71 void PrepareScene(); |
1383
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
72 |
1386
dfb48f0794b1
Ongoing splitting SDL vs WASM (preparing RtViewer WASM)
Benjamin Golinvaux <bgo@osimis.io>
parents:
1383
diff
changeset
|
73 #if ORTHANC_ENABLE_SDL |
dfb48f0794b1
Ongoing splitting SDL vs WASM (preparing RtViewer WASM)
Benjamin Golinvaux <bgo@osimis.io>
parents:
1383
diff
changeset
|
74 public: |
dfb48f0794b1
Ongoing splitting SDL vs WASM (preparing RtViewer WASM)
Benjamin Golinvaux <bgo@osimis.io>
parents:
1383
diff
changeset
|
75 void RunSdl(int argc, char* argv[]); |
1406
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1404
diff
changeset
|
76 void SdlRunLoop(const std::vector<boost::shared_ptr<OrthancStone::RtViewerView> >& views, |
1535
301571299212
DefaultViewportInteractor::SetWindowingLayer()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
77 OrthancStone::DefaultViewportInteractor& interactor); |
1386
dfb48f0794b1
Ongoing splitting SDL vs WASM (preparing RtViewer WASM)
Benjamin Golinvaux <bgo@osimis.io>
parents:
1383
diff
changeset
|
78 private: |
dfb48f0794b1
Ongoing splitting SDL vs WASM (preparing RtViewer WASM)
Benjamin Golinvaux <bgo@osimis.io>
parents:
1383
diff
changeset
|
79 void ProcessOptions(int argc, char* argv[]); |
dfb48f0794b1
Ongoing splitting SDL vs WASM (preparing RtViewer WASM)
Benjamin Golinvaux <bgo@osimis.io>
parents:
1383
diff
changeset
|
80 void HandleApplicationEvent(const SDL_Event& event); |
dfb48f0794b1
Ongoing splitting SDL vs WASM (preparing RtViewer WASM)
Benjamin Golinvaux <bgo@osimis.io>
parents:
1383
diff
changeset
|
81 #elif ORTHANC_ENABLE_WASM |
1393
27e0a00bd3e8
RtViewer SingleFrameViewer OK : wasm SDL single viewport
Benjamin Golinvaux <bgo@osimis.io>
parents:
1386
diff
changeset
|
82 public: |
27e0a00bd3e8
RtViewer SingleFrameViewer OK : wasm SDL single viewport
Benjamin Golinvaux <bgo@osimis.io>
parents:
1386
diff
changeset
|
83 void RunWasm(); |
27e0a00bd3e8
RtViewer SingleFrameViewer OK : wasm SDL single viewport
Benjamin Golinvaux <bgo@osimis.io>
parents:
1386
diff
changeset
|
84 #else |
27e0a00bd3e8
RtViewer SingleFrameViewer OK : wasm SDL single viewport
Benjamin Golinvaux <bgo@osimis.io>
parents:
1386
diff
changeset
|
85 # error Either ORTHANC_ENABLE_SDL or ORTHANC_ENABLE_WASM must be enabled |
1386
dfb48f0794b1
Ongoing splitting SDL vs WASM (preparing RtViewer WASM)
Benjamin Golinvaux <bgo@osimis.io>
parents:
1383
diff
changeset
|
86 #endif |
dfb48f0794b1
Ongoing splitting SDL vs WASM (preparing RtViewer WASM)
Benjamin Golinvaux <bgo@osimis.io>
parents:
1383
diff
changeset
|
87 |
dfb48f0794b1
Ongoing splitting SDL vs WASM (preparing RtViewer WASM)
Benjamin Golinvaux <bgo@osimis.io>
parents:
1383
diff
changeset
|
88 public: |
1383
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
89 void DisableTracker(); |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
90 |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
91 /** |
1393
27e0a00bd3e8
RtViewer SingleFrameViewer OK : wasm SDL single viewport
Benjamin Golinvaux <bgo@osimis.io>
parents:
1386
diff
changeset
|
92 Called by command-line option processing or when parsing the URL |
27e0a00bd3e8
RtViewer SingleFrameViewer OK : wasm SDL single viewport
Benjamin Golinvaux <bgo@osimis.io>
parents:
1386
diff
changeset
|
93 parameters. |
27e0a00bd3e8
RtViewer SingleFrameViewer OK : wasm SDL single viewport
Benjamin Golinvaux <bgo@osimis.io>
parents:
1386
diff
changeset
|
94 */ |
27e0a00bd3e8
RtViewer SingleFrameViewer OK : wasm SDL single viewport
Benjamin Golinvaux <bgo@osimis.io>
parents:
1386
diff
changeset
|
95 void SetArgument(const std::string& key, const std::string& value); |
27e0a00bd3e8
RtViewer SingleFrameViewer OK : wasm SDL single viewport
Benjamin Golinvaux <bgo@osimis.io>
parents:
1386
diff
changeset
|
96 |
1404
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1393
diff
changeset
|
97 const VolumeImageGeometry& GetMainGeometry(); |
1383
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
98 |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
99 static boost::shared_ptr<RtViewerApp> Create(); |
1404
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1393
diff
changeset
|
100 |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1393
diff
changeset
|
101 void CreateView(const std::string& canvasId, VolumeProjection projection); |
1383
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
102 |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
103 protected: |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
104 RtViewerApp(); |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
105 |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
106 private: |
1404
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1393
diff
changeset
|
107 void CreateLoaders(); |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1393
diff
changeset
|
108 void StartLoaders(); |
1383
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
109 void SelectNextTool(); |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
110 |
1393
27e0a00bd3e8
RtViewer SingleFrameViewer OK : wasm SDL single viewport
Benjamin Golinvaux <bgo@osimis.io>
parents:
1386
diff
changeset
|
111 // argument handling |
27e0a00bd3e8
RtViewer SingleFrameViewer OK : wasm SDL single viewport
Benjamin Golinvaux <bgo@osimis.io>
parents:
1386
diff
changeset
|
112 // SetArgument is above (public section) |
27e0a00bd3e8
RtViewer SingleFrameViewer OK : wasm SDL single viewport
Benjamin Golinvaux <bgo@osimis.io>
parents:
1386
diff
changeset
|
113 std::map<std::string, std::string> arguments_; |
1383
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
114 |
1427 | 115 std::string GetArgument(const std::string& key) const; |
1393
27e0a00bd3e8
RtViewer SingleFrameViewer OK : wasm SDL single viewport
Benjamin Golinvaux <bgo@osimis.io>
parents:
1386
diff
changeset
|
116 bool HasArgument(const std::string& key) const; |
1383
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
117 |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
118 /** |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
119 This adds the command at the top of the undo stack |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
120 */ |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
121 //void Commit(boost::shared_ptr<TrackerCommand> cmd); |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
122 void Undo(); |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
123 void Redo(); |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
124 |
1386
dfb48f0794b1
Ongoing splitting SDL vs WASM (preparing RtViewer WASM)
Benjamin Golinvaux <bgo@osimis.io>
parents:
1383
diff
changeset
|
125 void HandleGeometryReady(const DicomVolumeImage::GeometryReadyMessage& message); |
1383
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
126 |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
127 // TODO: wire this |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
128 void HandleCTLoaded(const OrthancSeriesVolumeProgressiveLoader::VolumeImageReadyInHighQuality& message); |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
129 void HandleCTContentUpdated(const OrthancStone::DicomVolumeImage::ContentUpdatedMessage& message); |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
130 void HandleDoseLoaded(const OrthancStone::DicomVolumeImage::ContentUpdatedMessage& message); |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
131 void HandleStructuresReady(const OrthancStone::DicomStructureSetLoader::StructuresReady& message); |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
132 void HandleStructuresUpdated(const OrthancStone::DicomStructureSetLoader::StructuresUpdated& message); |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
133 |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
134 |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
135 private: |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
136 void RetrieveGeometry(); |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
137 void FitContent(); |
1404
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1393
diff
changeset
|
138 void InvalidateAllViewports(); |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1393
diff
changeset
|
139 void UpdateLayersInAllViews(); |
1383
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
140 |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
141 private: |
1386
dfb48f0794b1
Ongoing splitting SDL vs WASM (preparing RtViewer WASM)
Benjamin Golinvaux <bgo@osimis.io>
parents:
1383
diff
changeset
|
142 boost::shared_ptr<DicomVolumeImage> ctVolume_; |
dfb48f0794b1
Ongoing splitting SDL vs WASM (preparing RtViewer WASM)
Benjamin Golinvaux <bgo@osimis.io>
parents:
1383
diff
changeset
|
143 boost::shared_ptr<DicomVolumeImage> doseVolume_; |
dfb48f0794b1
Ongoing splitting SDL vs WASM (preparing RtViewer WASM)
Benjamin Golinvaux <bgo@osimis.io>
parents:
1383
diff
changeset
|
144 |
1404
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1393
diff
changeset
|
145 std::vector<boost::shared_ptr<RtViewerView> > views_; |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1393
diff
changeset
|
146 |
1386
dfb48f0794b1
Ongoing splitting SDL vs WASM (preparing RtViewer WASM)
Benjamin Golinvaux <bgo@osimis.io>
parents:
1383
diff
changeset
|
147 boost::shared_ptr<OrthancSeriesVolumeProgressiveLoader> ctLoader_; |
dfb48f0794b1
Ongoing splitting SDL vs WASM (preparing RtViewer WASM)
Benjamin Golinvaux <bgo@osimis.io>
parents:
1383
diff
changeset
|
148 boost::shared_ptr<OrthancMultiframeVolumeLoader> doseLoader_; |
dfb48f0794b1
Ongoing splitting SDL vs WASM (preparing RtViewer WASM)
Benjamin Golinvaux <bgo@osimis.io>
parents:
1383
diff
changeset
|
149 boost::shared_ptr<DicomStructureSetLoader> rtstructLoader_; |
dfb48f0794b1
Ongoing splitting SDL vs WASM (preparing RtViewer WASM)
Benjamin Golinvaux <bgo@osimis.io>
parents:
1383
diff
changeset
|
150 |
dfb48f0794b1
Ongoing splitting SDL vs WASM (preparing RtViewer WASM)
Benjamin Golinvaux <bgo@osimis.io>
parents:
1383
diff
changeset
|
151 /** encapsulates resources shared by loaders */ |
1393
27e0a00bd3e8
RtViewer SingleFrameViewer OK : wasm SDL single viewport
Benjamin Golinvaux <bgo@osimis.io>
parents:
1386
diff
changeset
|
152 boost::shared_ptr<ILoadersContext> loadersContext_; |
27e0a00bd3e8
RtViewer SingleFrameViewer OK : wasm SDL single viewport
Benjamin Golinvaux <bgo@osimis.io>
parents:
1386
diff
changeset
|
153 |
1386
dfb48f0794b1
Ongoing splitting SDL vs WASM (preparing RtViewer WASM)
Benjamin Golinvaux <bgo@osimis.io>
parents:
1383
diff
changeset
|
154 /** |
dfb48f0794b1
Ongoing splitting SDL vs WASM (preparing RtViewer WASM)
Benjamin Golinvaux <bgo@osimis.io>
parents:
1383
diff
changeset
|
155 another interface to the ctLoader object (that also implements the IVolumeSlicer interface), that serves as the |
dfb48f0794b1
Ongoing splitting SDL vs WASM (preparing RtViewer WASM)
Benjamin Golinvaux <bgo@osimis.io>
parents:
1383
diff
changeset
|
156 reference for the geometry (position and dimensions of the volume + size of each voxel). It could be changed to be |
dfb48f0794b1
Ongoing splitting SDL vs WASM (preparing RtViewer WASM)
Benjamin Golinvaux <bgo@osimis.io>
parents:
1383
diff
changeset
|
157 the dose instead, but the CT is chosen because it usually has a better spatial resolution. |
dfb48f0794b1
Ongoing splitting SDL vs WASM (preparing RtViewer WASM)
Benjamin Golinvaux <bgo@osimis.io>
parents:
1383
diff
changeset
|
158 */ |
dfb48f0794b1
Ongoing splitting SDL vs WASM (preparing RtViewer WASM)
Benjamin Golinvaux <bgo@osimis.io>
parents:
1383
diff
changeset
|
159 boost::shared_ptr<OrthancStone::IGeometryProvider> geometryProvider_; |
dfb48f0794b1
Ongoing splitting SDL vs WASM (preparing RtViewer WASM)
Benjamin Golinvaux <bgo@osimis.io>
parents:
1383
diff
changeset
|
160 |
1383
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
161 boost::shared_ptr<IFlexiblePointerTracker> activeTracker_; |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
162 |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
163 boost::shared_ptr<UndoStack> undoStack_; |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
164 }; |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
165 |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
166 } |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
167 |
ab871499ed30
SingleFrameViewer: refactored file locations + names to share files for RtViewer
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
168 |
1457 | 169 |