Mercurial > hg > orthanc-stone
annotate Applications/Samples/SimpleViewer/SimpleViewerApplication.h @ 1327:4f8db2d202c8 broker
OrthancSeriesProgressiveLoader now has two modes that
can be selected at object creation :
- progressive (will first load jpeg50, then jpeg90 then PAM)
- non-progressive (will directly load PAM (uncompressed))
Please note that the slice loading order remains dynamic
and depending upon the slice that the client code wishes
to extract from the volume.
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Wed, 25 Mar 2020 14:34:27 +0100 |
parents | 8a0a62189f46 |
children |
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 |
1270
2d8ab34c8c91
upgrade to year 2020
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
732
diff
changeset
|
5 * Copyright (C) 2017-2020 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 |
527
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
24 /* |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
25 This header contains the command definitions for the sample applications |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
26 */ |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
27 #include "Applications/Samples/StoneSampleCommands_generated.hpp" |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
28 using namespace StoneSampleCommands; |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
29 |
319
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 "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
|
31 |
732
c35e98d22764
move Deprecated classes to a separate folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
726
diff
changeset
|
32 #include "../../../Framework/Deprecated/Layers/CircleMeasureTracker.h" |
c35e98d22764
move Deprecated classes to a separate folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
726
diff
changeset
|
33 #include "../../../Framework/Deprecated/Layers/LineMeasureTracker.h" |
c35e98d22764
move Deprecated classes to a separate folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
726
diff
changeset
|
34 #include "../../../Framework/Deprecated/SmartLoader.h" |
c35e98d22764
move Deprecated classes to a separate folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
726
diff
changeset
|
35 #include "../../../Framework/Deprecated/Widgets/LayoutWidget.h" |
c35e98d22764
move Deprecated classes to a separate folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
726
diff
changeset
|
36 #include "../../../Framework/Deprecated/Widgets/SliceViewerWidget.h" |
c35e98d22764
move Deprecated classes to a separate folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
726
diff
changeset
|
37 #include "../../../Framework/Messages/IObserver.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
|
38 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
39 #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
|
40 #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
|
41 #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
|
42 #endif |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
43 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
44 #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
|
45 #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
|
46 #endif |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
47 |
365
ef31240a73f6
no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
321
diff
changeset
|
48 #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
|
49 #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
|
50 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
51 #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
|
52 #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
|
53 #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
|
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 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
|
56 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
57 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
58 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
|
59 { |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
60 |
527
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
61 class SimpleViewerApplication |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
62 : public IStoneApplication |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
63 , public IObserver |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
64 , public IObservable |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
65 , public StoneSampleCommands::IHandler |
319
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 public: |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
68 |
714
d2c0e347ddc2
deprecating DicomFrameConverter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
535
diff
changeset
|
69 struct StatusUpdatedMessage : public IMessage |
319
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
70 { |
714
d2c0e347ddc2
deprecating DicomFrameConverter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
535
diff
changeset
|
71 ORTHANC_STONE_MESSAGE(__FILE__, __LINE__); |
d2c0e347ddc2
deprecating DicomFrameConverter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
535
diff
changeset
|
72 |
319
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
73 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
|
74 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
75 StatusUpdatedMessage(const AppStatus& status) |
714
d2c0e347ddc2
deprecating DicomFrameConverter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
535
diff
changeset
|
76 : status_(status) |
319
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
77 { |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
78 } |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
79 }; |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
80 |
527
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
81 private: |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
82 Tool currentTool_; |
319
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
83 |
1298
8a0a62189f46
replacing std::auto_ptr by std::unique_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1270
diff
changeset
|
84 std::unique_ptr<MainWidgetInteractor> mainWidgetInteractor_; |
8a0a62189f46
replacing std::auto_ptr by std::unique_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1270
diff
changeset
|
85 std::unique_ptr<ThumbnailInteractor> thumbnailInteractor_; |
726
4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
714
diff
changeset
|
86 Deprecated::LayoutWidget* mainLayout_; |
4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
714
diff
changeset
|
87 Deprecated::LayoutWidget* thumbnailsLayout_; |
4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
714
diff
changeset
|
88 Deprecated::SliceViewerWidget* mainWidget_; |
4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
714
diff
changeset
|
89 std::vector<Deprecated::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
|
90 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
|
91 std::map<std::string, Json::Value> seriesTags_; |
20f149669c1f
renamed LayerWidget as SliceViewerWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
387
diff
changeset
|
92 unsigned int currentInstanceIndex_; |
726
4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
714
diff
changeset
|
93 Deprecated::WidgetViewport* wasmViewport1_; |
4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
714
diff
changeset
|
94 Deprecated::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
|
95 |
726
4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
714
diff
changeset
|
96 Deprecated::IStatusBar* statusBar_; |
1298
8a0a62189f46
replacing std::auto_ptr by std::unique_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1270
diff
changeset
|
97 std::unique_ptr<Deprecated::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
|
98 |
388
20f149669c1f
renamed LayerWidget as SliceViewerWidget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
387
diff
changeset
|
99 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
|
100 |
319
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
101 public: |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
102 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
|
103 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
|
104 IObservable(broker), |
527
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
105 currentTool_(StoneSampleCommands::Tool_LineMeasure), |
319
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
106 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
|
107 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
|
108 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
|
109 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
|
110 { |
365
ef31240a73f6
no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
321
diff
changeset
|
111 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
|
112 } |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
113 |
535
79bb0a02d1cc
- Added ORTHANC_OVERRIDE to several methods (translates to "override" in C++ 11 compilers)
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
114 virtual void Finalize() ORTHANC_OVERRIDE {} |
726
4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
714
diff
changeset
|
115 virtual Deprecated::IWidget* GetCentralWidget() ORTHANC_OVERRIDE {return mainLayout_;} |
319
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
116 |
535
79bb0a02d1cc
- Added ORTHANC_OVERRIDE to several methods (translates to "override" in C++ 11 compilers)
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
117 virtual void DeclareStartupOptions(boost::program_options::options_description& options) ORTHANC_OVERRIDE; |
319
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
118 virtual void Initialize(StoneApplicationContext* context, |
726
4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
714
diff
changeset
|
119 Deprecated::IStatusBar& statusBar, |
535
79bb0a02d1cc
- Added ORTHANC_OVERRIDE to several methods (translates to "override" in C++ 11 compilers)
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
120 const boost::program_options::variables_map& parameters) ORTHANC_OVERRIDE; |
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 |
726
4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
714
diff
changeset
|
122 void OnStudyListReceived(const Deprecated::OrthancApiClient::JsonResponseReadyMessage& 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
|
123 |
726
4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
714
diff
changeset
|
124 void OnStudyReceived(const Deprecated::OrthancApiClient::JsonResponseReadyMessage& 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
|
125 |
726
4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
714
diff
changeset
|
126 void OnSeriesReceived(const Deprecated::OrthancApiClient::JsonResponseReadyMessage& 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
|
127 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
128 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
|
129 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
130 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
|
131 |
726
4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
714
diff
changeset
|
132 void OnWidgetGeometryChanged(const Deprecated::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
|
133 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
134 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
|
135 |
527
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
136 |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
137 Tool GetCurrentTool() const |
365
ef31240a73f6
no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
321
diff
changeset
|
138 { |
ef31240a73f6
no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
321
diff
changeset
|
139 return currentTool_; |
ef31240a73f6
no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
321
diff
changeset
|
140 } |
ef31240a73f6
no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
321
diff
changeset
|
141 |
ef31240a73f6
no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
321
diff
changeset
|
142 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
|
143 { |
ef31240a73f6
no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
321
diff
changeset
|
144 return font_; |
ef31240a73f6
no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
321
diff
changeset
|
145 } |
319
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
146 |
527
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
147 // ExecuteAction method was empty (its body was a single "TODO" comment) |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
148 virtual bool Handle(const SelectTool& value) ORTHANC_OVERRIDE; |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
149 virtual bool Handle(const Action& value) ORTHANC_OVERRIDE; |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
150 |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
151 template<typename T> |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
152 bool ExecuteCommand(const T& cmd) |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
153 { |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
154 std::string cmdStr = StoneSampleCommands::StoneSerialize(cmd); |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
155 return StoneSampleCommands::StoneDispatchToHandler(cmdStr, this); |
b1377625e4ba
Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
156 } |
319
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
157 |
535
79bb0a02d1cc
- Added ORTHANC_OVERRIDE to several methods (translates to "override" in C++ 11 compilers)
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
158 virtual void HandleSerializedMessage(const char* data) ORTHANC_OVERRIDE |
79bb0a02d1cc
- Added ORTHANC_OVERRIDE to several methods (translates to "override" in C++ 11 compilers)
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
159 { |
79bb0a02d1cc
- Added ORTHANC_OVERRIDE to several methods (translates to "override" in C++ 11 compilers)
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
160 StoneSampleCommands::StoneDispatchToHandler(data, this); |
79bb0a02d1cc
- Added ORTHANC_OVERRIDE to several methods (translates to "override" in C++ 11 compilers)
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
161 } |
79bb0a02d1cc
- Added ORTHANC_OVERRIDE to several methods (translates to "override" in C++ 11 compilers)
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
162 |
79bb0a02d1cc
- Added ORTHANC_OVERRIDE to several methods (translates to "override" in C++ 11 compilers)
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
163 virtual std::string GetTitle() const ORTHANC_OVERRIDE {return "SimpleViewer";} |
319
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
164 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
165 #if ORTHANC_ENABLE_WASM==1 |
535
79bb0a02d1cc
- Added ORTHANC_OVERRIDE to several methods (translates to "override" in C++ 11 compilers)
Benjamin Golinvaux <bgo@osimis.io>
parents:
527
diff
changeset
|
166 virtual void InitializeWasm() ORTHANC_OVERRIDE; |
319
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
167 #endif |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
168 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
169 #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
|
170 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
|
171 #endif |
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 |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
diff
changeset
|
175 } |