Mercurial > hg > orthanc-stone
annotate Applications/Samples/SimpleViewer/SimpleViewerApplication.h @ 511:2f17b3659781
ORTHANC_STONE_APPLICATION_RESOURCES in CMake
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 07 Mar 2019 11:32:39 +0100 |
parents | b70e9be013e4 |
children | b1377625e4ba |
rev | line source |
---|---|
319
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
1 /** |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
2 * Stone of Orthanc |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
439 | 5 * Copyright (C) 2017-2019 Osimis S.A., Belgium |
319
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
6 * |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
7 * This program is free software: you can redistribute it and/or |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
8 * modify it under the terms of the GNU Affero General Public License |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
9 * as published by the Free Software Foundation, either version 3 of |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
10 * the License, or (at your option) any later version. |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
11 * |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
12 * This program is distributed in the hope that it will be useful, but |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
13 * WITHOUT ANY WARRANTY; without even the implied warranty of |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
15 * Affero General Public License for more details. |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
16 * |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
17 * You should have received a copy of the GNU Affero General Public License |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
19 **/ |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
20 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
21 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
22 #pragma once |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
23 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
24 #include "Applications/IStoneApplication.h" |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
25 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
26 #include "Framework/Layers/CircleMeasureTracker.h" |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
27 #include "Framework/Layers/LineMeasureTracker.h" |
388
20f149669c1f
renamed LayerWidget as SliceViewerWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
387
diff
changeset
|
28 #include "Framework/Widgets/SliceViewerWidget.h" |
319
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
29 #include "Framework/Widgets/LayoutWidget.h" |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
30 #include "Framework/Messages/IObserver.h" |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
31 #include "Framework/SmartLoader.h" |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
32 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
33 #if ORTHANC_ENABLE_WASM==1 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
34 #include "Platforms/Wasm/WasmPlatformApplicationAdapter.h" |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
35 #include "Platforms/Wasm/Defaults.h" |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
36 #endif |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
37 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
38 #if ORTHANC_ENABLE_QT==1 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
39 #include "Qt/SimpleViewerMainWindow.h" |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
40 #endif |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
41 |
365
ef31240a73f6
no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
321
diff
changeset
|
42 #include <Core/Images/Font.h> |
319
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
43 #include <Core/Logging.h> |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
44 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
45 #include "ThumbnailInteractor.h" |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
46 #include "MainWidgetInteractor.h" |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
47 #include "AppStatus.h" |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
48 #include "Messages.h" |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
49 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
50 using namespace OrthancStone; |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
51 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
52 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
53 namespace SimpleViewer |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
54 { |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
55 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
56 class SimpleViewerApplication : |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
57 public IStoneApplication, |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
58 public IObserver, |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
59 public IObservable |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
60 { |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
61 public: |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
62 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
63 struct StatusUpdatedMessage : public BaseMessage<SimpleViewerMessageType_AppStatusUpdated> |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
64 { |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
65 const AppStatus& status_; |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
66 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
67 StatusUpdatedMessage(const AppStatus& status) |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
68 : BaseMessage(), |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
69 status_(status) |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
70 { |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
71 } |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
72 }; |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
73 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
74 enum Tools { |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
75 Tools_LineMeasure, |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
76 Tools_CircleMeasure, |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
77 Tools_Crop, |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
78 Tools_Windowing, |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
79 Tools_Zoom, |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
80 Tools_Pan |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
81 }; |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
82 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
83 enum Actions { |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
84 Actions_Rotate, |
321 | 85 Actions_Invert, |
86 Actions_UndoCrop | |
319
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
87 }; |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
88 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
89 private: |
388
20f149669c1f
renamed LayerWidget as SliceViewerWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
387
diff
changeset
|
90 Tools currentTool_; |
387
a8b5cf760473
fix for older compilers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
365
diff
changeset
|
91 std::auto_ptr<MainWidgetInteractor> mainWidgetInteractor_; |
a8b5cf760473
fix for older compilers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
365
diff
changeset
|
92 std::auto_ptr<ThumbnailInteractor> thumbnailInteractor_; |
388
20f149669c1f
renamed LayerWidget as SliceViewerWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
387
diff
changeset
|
93 LayoutWidget* mainLayout_; |
20f149669c1f
renamed LayerWidget as SliceViewerWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
387
diff
changeset
|
94 LayoutWidget* thumbnailsLayout_; |
20f149669c1f
renamed LayerWidget as SliceViewerWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
387
diff
changeset
|
95 SliceViewerWidget* mainWidget_; |
20f149669c1f
renamed LayerWidget as SliceViewerWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
387
diff
changeset
|
96 std::vector<SliceViewerWidget*> thumbnails_; |
365
ef31240a73f6
no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
321
diff
changeset
|
97 std::map<std::string, std::vector<std::string> > instancesIdsPerSeriesId_; |
388
20f149669c1f
renamed LayerWidget as SliceViewerWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
387
diff
changeset
|
98 std::map<std::string, Json::Value> seriesTags_; |
20f149669c1f
renamed LayerWidget as SliceViewerWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
387
diff
changeset
|
99 BaseCommandBuilder commandBuilder_; |
319
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
100 |
388
20f149669c1f
renamed LayerWidget as SliceViewerWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
387
diff
changeset
|
101 unsigned int currentInstanceIndex_; |
20f149669c1f
renamed LayerWidget as SliceViewerWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
387
diff
changeset
|
102 OrthancStone::WidgetViewport* wasmViewport1_; |
20f149669c1f
renamed LayerWidget as SliceViewerWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
387
diff
changeset
|
103 OrthancStone::WidgetViewport* wasmViewport2_; |
319
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
104 |
388
20f149669c1f
renamed LayerWidget as SliceViewerWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
387
diff
changeset
|
105 IStatusBar* statusBar_; |
20f149669c1f
renamed LayerWidget as SliceViewerWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
387
diff
changeset
|
106 std::auto_ptr<SmartLoader> smartLoader_; |
319
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
107 |
388
20f149669c1f
renamed LayerWidget as SliceViewerWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
387
diff
changeset
|
108 Orthanc::Font font_; |
365
ef31240a73f6
no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
321
diff
changeset
|
109 |
319
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
110 public: |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
111 SimpleViewerApplication(MessageBroker& broker) : |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
112 IObserver(broker), |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
113 IObservable(broker), |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
114 currentTool_(Tools_LineMeasure), |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
115 mainLayout_(NULL), |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
116 currentInstanceIndex_(0), |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
117 wasmViewport1_(NULL), |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
118 wasmViewport2_(NULL) |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
119 { |
365
ef31240a73f6
no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
321
diff
changeset
|
120 font_.LoadFromResource(Orthanc::EmbeddedResources::FONT_UBUNTU_MONO_BOLD_16); |
319
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
121 } |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
122 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
123 virtual void Finalize() {} |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
124 virtual IWidget* GetCentralWidget() {return mainLayout_;} |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
125 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
126 virtual void DeclareStartupOptions(boost::program_options::options_description& options); |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
127 virtual void Initialize(StoneApplicationContext* context, |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
128 IStatusBar& statusBar, |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
129 const boost::program_options::variables_map& parameters); |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
130 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
131 void OnStudyListReceived(const OrthancApiClient::JsonResponseReadyMessage& message); |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
132 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
133 void OnStudyReceived(const OrthancApiClient::JsonResponseReadyMessage& message); |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
134 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
135 void OnSeriesReceived(const OrthancApiClient::JsonResponseReadyMessage& message); |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
136 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
137 void LoadThumbnailForSeries(const std::string& seriesId, const std::string& instanceId); |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
138 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
139 void SelectStudy(const std::string& studyId); |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
140 |
388
20f149669c1f
renamed LayerWidget as SliceViewerWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
387
diff
changeset
|
141 void OnWidgetGeometryChanged(const SliceViewerWidget::GeometryChangedMessage& message); |
319
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
142 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
143 void SelectSeriesInMainViewport(const std::string& seriesId); |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
144 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
145 void SelectTool(Tools tool); |
365
ef31240a73f6
no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
321
diff
changeset
|
146 |
ef31240a73f6
no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
321
diff
changeset
|
147 Tools GetCurrentTool() const |
ef31240a73f6
no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
321
diff
changeset
|
148 { |
ef31240a73f6
no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
321
diff
changeset
|
149 return currentTool_; |
ef31240a73f6
no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
321
diff
changeset
|
150 } |
ef31240a73f6
no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
321
diff
changeset
|
151 |
ef31240a73f6
no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
321
diff
changeset
|
152 const Orthanc::Font& GetFont() const |
ef31240a73f6
no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
321
diff
changeset
|
153 { |
ef31240a73f6
no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
321
diff
changeset
|
154 return font_; |
ef31240a73f6
no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
321
diff
changeset
|
155 } |
319
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
156 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
157 void ExecuteAction(Actions action); |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
158 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
159 virtual std::string GetTitle() const {return "SimpleViewer";} |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
160 virtual void ExecuteCommand(ICommand& command); |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
161 virtual BaseCommandBuilder& GetCommandBuilder() {return commandBuilder_;} |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
162 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
163 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
164 #if ORTHANC_ENABLE_WASM==1 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
165 virtual void InitializeWasm(); |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
166 #endif |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
167 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
168 #if ORTHANC_ENABLE_QT==1 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
169 virtual QStoneMainWindow* CreateQtMainWindow(); |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
170 #endif |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
171 }; |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
172 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
173 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
174 } |