comparison Applications/BasicApplicationContext.h @ 57:d20e25cfcf3a wasm

IWebService
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 03 May 2017 14:45:21 +0200
parents c2dc924f1a63
children 1553b67b24e5
comparison
equal deleted inserted replaced
56:9e3c2e75b870 57:d20e25cfcf3a
23 23
24 #include "../../Framework/Volumes/VolumeImage.h" 24 #include "../../Framework/Volumes/VolumeImage.h"
25 #include "../../Framework/Viewport/WidgetViewport.h" 25 #include "../../Framework/Viewport/WidgetViewport.h"
26 #include "../../Framework/Widgets/IWorldSceneInteractor.h" 26 #include "../../Framework/Widgets/IWorldSceneInteractor.h"
27 #include "../../Framework/Toolbox/DicomStructureSet.h" 27 #include "../../Framework/Toolbox/DicomStructureSet.h"
28 #include "../../Framework/Toolbox/OrthancWebService.h"
28 29
29 #include <list> 30 #include <list>
30 #include <boost/thread.hpp> 31 #include <boost/thread.hpp>
31 32
32 namespace OrthancStone 33 namespace OrthancStone
38 typedef std::list<IWorldSceneInteractor*> Interactors; 39 typedef std::list<IWorldSceneInteractor*> Interactors;
39 typedef std::list<DicomStructureSet*> StructureSets; 40 typedef std::list<DicomStructureSet*> StructureSets;
40 41
41 static void UpdateThread(BasicApplicationContext* that); 42 static void UpdateThread(BasicApplicationContext* that);
42 43
43 OrthancPlugins::IOrthancConnection& orthanc_; 44 OrthancWebService& orthanc_;
44 45 boost::mutex viewportMutex_;
45 boost::mutex viewportMutex_; 46 WidgetViewport viewport_;
46 WidgetViewport viewport_; 47 Volumes volumes_;
47 Volumes volumes_; 48 Interactors interactors_;
48 Interactors interactors_; 49 StructureSets structureSets_;
49 StructureSets structureSets_; 50 boost::thread updateThread_;
50 boost::thread updateThread_; 51 bool stopped_;
51 bool stopped_; 52 unsigned int updateDelay_;
52 unsigned int updateDelay_;
53 53
54 public: 54 public:
55 class ViewportLocker : public boost::noncopyable 55 class ViewportLocker : public boost::noncopyable
56 { 56 {
57 private: 57 private:
70 return viewport_; 70 return viewport_;
71 } 71 }
72 }; 72 };
73 73
74 74
75 BasicApplicationContext(OrthancPlugins::IOrthancConnection& orthanc); 75 BasicApplicationContext(OrthancWebService& orthanc);
76 76
77 ~BasicApplicationContext(); 77 ~BasicApplicationContext();
78 78
79 IWidget& SetCentralWidget(IWidget* widget); // Takes ownership 79 IWidget& SetCentralWidget(IWidget* widget); // Takes ownership
80 80
81 OrthancPlugins::IOrthancConnection& GetOrthancConnection() 81 OrthancWebService& GetWebService()
82 { 82 {
83 return orthanc_; 83 return orthanc_;
84 } 84 }
85 85
86 VolumeImage& AddSeriesVolume(const std::string& series, 86 VolumeImage& AddSeriesVolume(const std::string& series,
87 bool isProgressiveDownload, 87 bool isProgressiveDownload,
88 size_t downloadThreadCount); 88 size_t downloadThreadCount);
89 89
90 DicomStructureSet& AddStructureSet(const std::string& instance); 90 DicomStructureSet& AddStructureSet(const std::string& instance);