Mercurial > hg > orthanc-stone
annotate Applications/Samples/Common/RtViewerView.h @ 1925:a7a77488ddb1
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 23 Mar 2022 14:21:22 +0100 |
parents | 7053b8a0aaec |
children | 07964689cb0b |
rev | line source |
---|---|
1404
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
1 /** |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
2 * Stone of Orthanc |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
1871
7053b8a0aaec
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1870
diff
changeset
|
5 * Copyright (C) 2017-2022 Osimis S.A., Belgium |
7053b8a0aaec
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1870
diff
changeset
|
6 * Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
1404
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
7 * |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
8 * This program is free software: you can redistribute it and/or |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
9 * modify it under the terms of the GNU Affero General Public License |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
10 * as published by the Free Software Foundation, either version 3 of |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
11 * the License, or (at your option) any later version. |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
12 * |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
13 * This program is distributed in the hope that it will be useful, but |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
14 * WITHOUT ANY WARRANTY; without even the implied warranty of |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
16 * Affero General Public License for more details. |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
17 * |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
18 * You should have received a copy of the GNU Affero General Public License |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
20 **/ |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
21 |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
22 |
1458
828a9b4ee1b7
added missing copyright
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1457
diff
changeset
|
23 #pragma once |
828a9b4ee1b7
added missing copyright
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1457
diff
changeset
|
24 |
1542 | 25 #include "../../../OrthancStone/Sources/Loaders/DicomStructureSetLoader.h" |
26 #include "../../../OrthancStone/Sources/Loaders/ILoadersContext.h" | |
27 #include "../../../OrthancStone/Sources/Loaders/OrthancMultiframeVolumeLoader.h" | |
28 #include "../../../OrthancStone/Sources/Loaders/OrthancSeriesVolumeProgressiveLoader.h" | |
29 #include "../../../OrthancStone/Sources/Messages/IMessageEmitter.h" | |
30 #include "../../../OrthancStone/Sources/Messages/IObserver.h" | |
31 #include "../../../OrthancStone/Sources/Messages/ObserverBase.h" | |
32 #include "../../../OrthancStone/Sources/Oracle/OracleCommandExceptionMessage.h" | |
33 #include "../../../OrthancStone/Sources/Scene2DViewport/ViewportController.h" | |
34 #include "../../../OrthancStone/Sources/Viewport/IViewport.h" | |
35 #include "../../../OrthancStone/Sources/Volumes/DicomVolumeImage.h" | |
36 #include "../../../OrthancStone/Sources/Volumes/VolumeSceneLayerSource.h" | |
1404
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
37 |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
38 #include <boost/enable_shared_from_this.hpp> |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
39 #include <boost/thread.hpp> |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
40 #include <boost/noncopyable.hpp> |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
41 |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
42 namespace OrthancStone |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
43 { |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
44 class RtViewerApp; |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
45 |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
46 class RtViewerView : public ObserverBase<RtViewerView> |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
47 { |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
48 public: |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
49 RtViewerView(boost::weak_ptr<RtViewerApp> app, |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
50 const std::string& canvasId, |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
51 VolumeProjection projection) |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
52 : app_(app) |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
53 , currentPlane_(0) |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
54 , projection_(projection) |
1535
301571299212
DefaultViewportInteractor::SetWindowingLayer()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
55 , ctLayer_(0) |
1619
4c9e68291467
Added code to remove the wheel callback in dtor, to prevent access to dead object
Benjamin Golinvaux <bgo@osimis.io>
parents:
1573
diff
changeset
|
56 , canvasId_(canvasId) |
1404
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
57 { |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
58 viewport_ = CreateViewport(canvasId); |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
59 FLOATING_INFOTEXT_LAYER_ZINDEX = 6; |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
60 FIXED_INFOTEXT_LAYER_ZINDEX = 7; |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
61 } |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
62 |
1619
4c9e68291467
Added code to remove the wheel callback in dtor, to prevent access to dead object
Benjamin Golinvaux <bgo@osimis.io>
parents:
1573
diff
changeset
|
63 ~RtViewerView() |
4c9e68291467
Added code to remove the wheel callback in dtor, to prevent access to dead object
Benjamin Golinvaux <bgo@osimis.io>
parents:
1573
diff
changeset
|
64 { |
4c9e68291467
Added code to remove the wheel callback in dtor, to prevent access to dead object
Benjamin Golinvaux <bgo@osimis.io>
parents:
1573
diff
changeset
|
65 CleanupViewportEvents(); |
4c9e68291467
Added code to remove the wheel callback in dtor, to prevent access to dead object
Benjamin Golinvaux <bgo@osimis.io>
parents:
1573
diff
changeset
|
66 } |
4c9e68291467
Added code to remove the wheel callback in dtor, to prevent access to dead object
Benjamin Golinvaux <bgo@osimis.io>
parents:
1573
diff
changeset
|
67 |
1404
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
68 /** |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
69 This method is called when the scene transform changes. It allows to |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
70 recompute the visual elements whose content depend upon the scene transform |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
71 */ |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
72 void OnSceneTransformChanged( |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
73 const ViewportController::SceneTransformChanged& message); |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
74 |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
75 /** |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
76 This method will ask the VolumeSceneLayerSource, that are responsible to |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
77 generated 2D content based on a volume and a cutting plane, to regenerate |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
78 it. This is required if the volume itself changes (during loading) or if |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
79 the cutting plane is changed |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
80 */ |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
81 void UpdateLayers(); |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
82 |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
83 void Refresh(); |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
84 |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
85 void TakeScreenshot( |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
86 const std::string& target, |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
87 unsigned int canvasWidth, |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
88 unsigned int canvasHeight); |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
89 |
1406
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1404
diff
changeset
|
90 void Scroll(int delta); |
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1404
diff
changeset
|
91 |
1404
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
92 void Invalidate(); |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
93 void FitContent(); |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
94 void RetrieveGeometry(); |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
95 void PrepareViewport(); |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
96 void RegisterMessages(); |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
97 |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
98 #if ORTHANC_ENABLE_SDL == 1 |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
99 void EnableGLDebugOutput(); |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
100 #endif |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
101 |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
102 void CreateLayers(boost::shared_ptr<OrthancSeriesVolumeProgressiveLoader> ctLoader, |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
103 boost::shared_ptr<OrthancMultiframeVolumeLoader> doseLoader, |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
104 boost::shared_ptr<DicomVolumeImage> doseVolume, |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
105 boost::shared_ptr<DicomStructureSetLoader> rtstructLoader); |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
106 |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
107 boost::shared_ptr<IViewport> GetViewport() |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
108 { |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
109 return viewport_; |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
110 } |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
111 |
1535
301571299212
DefaultViewportInteractor::SetWindowingLayer()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
112 int GetCtLayerIndex() const |
301571299212
DefaultViewportInteractor::SetWindowingLayer()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
113 { |
301571299212
DefaultViewportInteractor::SetWindowingLayer()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
114 return ctLayer_; |
301571299212
DefaultViewportInteractor::SetWindowingLayer()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
115 } |
301571299212
DefaultViewportInteractor::SetWindowingLayer()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
116 |
1404
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
117 private: |
1573 | 118 void SetInfoDisplayMessage(const std::string& key, |
119 const std::string& value); | |
1404
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
120 boost::shared_ptr<RtViewerApp> GetApp(); |
1406
5d7ee14dc1eb
Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
1404
diff
changeset
|
121 boost::shared_ptr<IViewport> CreateViewport(const std::string& canvasId); |
1619
4c9e68291467
Added code to remove the wheel callback in dtor, to prevent access to dead object
Benjamin Golinvaux <bgo@osimis.io>
parents:
1573
diff
changeset
|
122 void CleanupViewportEvents(); |
1404
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
123 void DisplayInfoText(); |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
124 void HideInfoText(); |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
125 void DisplayFloatingCtrlInfoText(const PointerEvent& e); |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
126 |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
127 void SetCtVolumeSlicer(const boost::shared_ptr<IVolumeSlicer>& volume, |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
128 ILayerStyleConfigurator* style); |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
129 |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
130 void SetDoseVolumeSlicer(const boost::shared_ptr<IVolumeSlicer>& volume, |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
131 ILayerStyleConfigurator* style); |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
132 |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
133 void SetStructureSet(const boost::shared_ptr<DicomStructureSetLoader>& volume); |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
134 |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
135 private: |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
136 boost::weak_ptr<RtViewerApp> app_; |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
137 boost::shared_ptr<VolumeSceneLayerSource> ctVolumeLayerSource_, doseVolumeLayerSource_, structLayerSource_; |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
138 |
1640
52b8b96cb55f
cleaning namespaces
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1619
diff
changeset
|
139 // collection of cutting planes for this particular view |
52b8b96cb55f
cleaning namespaces
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1619
diff
changeset
|
140 std::vector<CoordinateSystem3D> planes_; |
52b8b96cb55f
cleaning namespaces
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1619
diff
changeset
|
141 size_t currentPlane_; |
52b8b96cb55f
cleaning namespaces
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1619
diff
changeset
|
142 VolumeProjection projection_; |
52b8b96cb55f
cleaning namespaces
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1619
diff
changeset
|
143 std::map<std::string, std::string> infoTextMap_; |
1404
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
144 |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
145 int FLOATING_INFOTEXT_LAYER_ZINDEX; |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
146 int FIXED_INFOTEXT_LAYER_ZINDEX; |
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
147 boost::shared_ptr<IViewport> viewport_; |
1535
301571299212
DefaultViewportInteractor::SetWindowingLayer()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
148 |
301571299212
DefaultViewportInteractor::SetWindowingLayer()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
149 int ctLayer_; |
1619
4c9e68291467
Added code to remove the wheel callback in dtor, to prevent access to dead object
Benjamin Golinvaux <bgo@osimis.io>
parents:
1573
diff
changeset
|
150 std::string canvasId_; |
1404
3e644f6fadd4
Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
151 }; |
1457 | 152 } |