Mercurial > hg > orthanc-stone
comparison Applications/BasicApplicationContext.h @ 51:b340879da9bd
reorganization
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 27 Apr 2017 14:50:20 +0200 |
parents | Framework/Applications/BasicApplicationContext.h@28956ed68280 |
children | c2dc924f1a63 4cff7b1ed31d |
comparison
equal
deleted
inserted
replaced
49:c45f368de5c0 | 51:b340879da9bd |
---|---|
1 /** | |
2 * Stone of Orthanc | |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
5 * Copyright (C) 2017 Osimis, Belgium | |
6 * | |
7 * This program is free software: you can redistribute it and/or | |
8 * modify it under the terms of the GNU Affero General Public License | |
9 * as published by the Free Software Foundation, either version 3 of | |
10 * the License, or (at your option) any later version. | |
11 * | |
12 * This program is distributed in the hope that it will be useful, but | |
13 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 * Affero General Public License for more details. | |
16 * | |
17 * You should have received a copy of the GNU Affero General Public License | |
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
19 **/ | |
20 | |
21 | |
22 #pragma once | |
23 | |
24 #include "../../Framework/Volumes/VolumeImage.h" | |
25 #include "../../Framework/Viewport/WidgetViewport.h" | |
26 #include "../../Framework/Widgets/IWorldSceneInteractor.h" | |
27 #include "../../Framework/Toolbox/DicomStructureSet.h" | |
28 | |
29 #include <list> | |
30 | |
31 namespace OrthancStone | |
32 { | |
33 class BasicApplicationContext : public boost::noncopyable | |
34 { | |
35 private: | |
36 typedef std::list<ISliceableVolume*> Volumes; | |
37 typedef std::list<IWorldSceneInteractor*> Interactors; | |
38 typedef std::list<DicomStructureSet*> StructureSets; | |
39 | |
40 OrthancPlugins::IOrthancConnection& orthanc_; | |
41 | |
42 WidgetViewport viewport_; | |
43 Volumes volumes_; | |
44 Interactors interactors_; | |
45 StructureSets structureSets_; | |
46 | |
47 public: | |
48 BasicApplicationContext(OrthancPlugins::IOrthancConnection& orthanc); | |
49 | |
50 ~BasicApplicationContext(); | |
51 | |
52 IWidget& SetCentralWidget(IWidget* widget); // Takes ownership | |
53 | |
54 IViewport& GetViewport() | |
55 { | |
56 return viewport_; | |
57 } | |
58 | |
59 OrthancPlugins::IOrthancConnection& GetOrthancConnection() | |
60 { | |
61 return orthanc_; | |
62 } | |
63 | |
64 VolumeImage& AddSeriesVolume(const std::string& series, | |
65 bool isProgressiveDownload, | |
66 size_t downloadThreadCount); | |
67 | |
68 DicomStructureSet& AddStructureSet(const std::string& instance); | |
69 | |
70 IWorldSceneInteractor& AddInteractor(IWorldSceneInteractor* interactor); | |
71 | |
72 void Start(); | |
73 | |
74 void Stop(); | |
75 }; | |
76 } |