Mercurial > hg > orthanc-stone
annotate Applications/Samples/CtPetDoseStructFusion/CtPetDoseStructFusionApplication.h @ 540:7428c5dfa5df ct-pet-dose-struct
Initial commit non working app
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Tue, 19 Mar 2019 16:29:07 +0100 |
parents | |
children |
rev | line source |
---|---|
540
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
1 /** |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
2 * Stone of Orthanc |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
5 * Copyright (C) 2017-2019 Osimis S.A., Belgium |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
6 * |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
7 * This program is free software: you can redistribute it and/or |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
8 * modify it under the terms of the GNU Affero General Public License |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
9 * as published by the Free Software Foundation, either version 3 of |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
10 * the License, or (at your option) any later version. |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
11 * |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
12 * This program is distributed in the hope that it will be useful, but |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
13 * WITHOUT ANY WARRANTY; without even the implied warranty of |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
15 * Affero General Public License for more details. |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
16 * |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
17 * You should have received a copy of the GNU Affero General Public License |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
19 **/ |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
20 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
21 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
22 #pragma once |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
23 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
24 /* |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
25 This header contains the command definitions for the sample applications |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
26 */ |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
27 #include "Applications/Samples/StoneSampleCommands_generated.hpp" |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
28 using namespace StoneSampleCommands; |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
29 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
30 #include "Applications/IStoneApplication.h" |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
31 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
32 #include "Framework/Layers/CircleMeasureTracker.h" |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
33 #include "Framework/Layers/LineMeasureTracker.h" |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
34 #include "Framework/Widgets/SliceViewerWidget.h" |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
35 #include "Framework/Widgets/LayoutWidget.h" |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
36 #include "Framework/Messages/IObserver.h" |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
37 #include "Framework/SmartLoader.h" |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
38 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
39 #if ORTHANC_ENABLE_WASM==1 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
40 #include "Platforms/Wasm/WasmPlatformApplicationAdapter.h" |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
41 #include "Platforms/Wasm/Defaults.h" |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
42 #endif |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
43 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
44 #if ORTHANC_ENABLE_QT==1 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
45 #include "Qt/CtPetDoseStructFusionMainWindow.h" |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
46 #endif |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
47 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
48 #include <Core/Images/Font.h> |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
49 #include <Core/Logging.h> |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
50 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
51 #include "ThumbnailInteractor.h" |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
52 #include "MainWidgetInteractor.h" |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
53 #include "AppStatus.h" |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
54 #include "Messages.h" |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
55 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
56 using namespace OrthancStone; |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
57 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
58 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
59 namespace CtPetDoseStructFusion |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
60 { |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
61 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
62 class CtPetDoseStructFusionApplication |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
63 : public IStoneApplication |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
64 , public IObserver |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
65 , public IObservable |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
66 , public StoneSampleCommands::IHandler |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
67 { |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
68 public: |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
69 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
70 struct StatusUpdatedMessage : public BaseMessage<CtPetDoseStructFusionMessageType_AppStatusUpdated> |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
71 { |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
72 const AppStatus& status_; |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
73 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
74 StatusUpdatedMessage(const AppStatus& status) |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
75 : BaseMessage(), |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
76 status_(status) |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
77 { |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
78 } |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
79 }; |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
80 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
81 private: |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
82 Tool currentTool_; |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
83 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
84 std::auto_ptr<MainWidgetInteractor> mainWidgetInteractor_; |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
85 std::auto_ptr<ThumbnailInteractor> thumbnailInteractor_; |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
86 LayoutWidget* mainLayout_; |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
87 LayoutWidget* thumbnailsLayout_; |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
88 SliceViewerWidget* mainWidget_; |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
89 std::vector<SliceViewerWidget*> thumbnails_; |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
90 std::map<std::string, std::vector<std::string> > instancesIdsPerSeriesId_; |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
91 std::map<std::string, Json::Value> seriesTags_; |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
92 unsigned int currentInstanceIndex_; |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
93 OrthancStone::WidgetViewport* wasmViewport1_; |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
94 OrthancStone::WidgetViewport* wasmViewport2_; |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
95 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
96 IStatusBar* statusBar_; |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
97 std::auto_ptr<SmartLoader> smartLoader_; |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
98 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
99 Orthanc::Font font_; |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
100 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
101 public: |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
102 CtPetDoseStructFusionApplication(MessageBroker& broker) : |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
103 IObserver(broker), |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
104 IObservable(broker), |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
105 currentTool_(StoneSampleCommands::Tool_LineMeasure), |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
106 mainLayout_(NULL), |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
107 currentInstanceIndex_(0), |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
108 wasmViewport1_(NULL), |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
109 wasmViewport2_(NULL) |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
110 { |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
111 font_.LoadFromResource(Orthanc::EmbeddedResources::FONT_UBUNTU_MONO_BOLD_16); |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
112 } |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
113 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
114 virtual void Finalize() {} |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
115 virtual IWidget* GetCentralWidget() {return mainLayout_;} |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
116 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
117 virtual void DeclareStartupOptions(boost::program_options::options_description& options); |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
118 virtual void Initialize(StoneApplicationContext* context, |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
119 IStatusBar& statusBar, |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
120 const boost::program_options::variables_map& parameters); |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
121 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
122 void OnStudyListReceived(const OrthancApiClient::JsonResponseReadyMessage& message); |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
123 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
124 void OnStudyReceived(const OrthancApiClient::JsonResponseReadyMessage& message); |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
125 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
126 void OnSeriesReceived(const OrthancApiClient::JsonResponseReadyMessage& message); |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
127 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
128 void LoadThumbnailForSeries(const std::string& seriesId, const std::string& instanceId); |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
129 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
130 void SelectStudy(const std::string& studyId); |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
131 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
132 void OnWidgetGeometryChanged(const SliceViewerWidget::GeometryChangedMessage& message); |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
133 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
134 void SelectSeriesInMainViewport(const std::string& seriesId); |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
135 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
136 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
137 Tool GetCurrentTool() const |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
138 { |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
139 return currentTool_; |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
140 } |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
141 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
142 const Orthanc::Font& GetFont() const |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
143 { |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
144 return font_; |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
145 } |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
146 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
147 // ExecuteAction method was empty (its body was a single "TODO" comment) |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
148 virtual bool Handle(const SelectTool& value) ORTHANC_OVERRIDE; |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
149 virtual bool Handle(const Action& value) ORTHANC_OVERRIDE; |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
150 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
151 template<typename T> |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
152 bool ExecuteCommand(const T& cmd) |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
153 { |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
154 std::string cmdStr = StoneSampleCommands::StoneSerialize(cmd); |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
155 return StoneSampleCommands::StoneDispatchToHandler(cmdStr, this); |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
156 } |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
157 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
158 virtual std::string GetTitle() const {return "CtPetDoseStructFusion";} |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
159 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
160 #if ORTHANC_ENABLE_WASM==1 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
161 virtual void InitializeWasm(); |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
162 #endif |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
163 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
164 #if ORTHANC_ENABLE_QT==1 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
165 virtual QStoneMainWindow* CreateQtMainWindow(); |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
166 #endif |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
167 }; |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
168 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
169 |
7428c5dfa5df
Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
170 } |