Mercurial > hg > orthanc-stone
comparison Framework/Layers/DicomStructureSetRendererFactory.h @ 128:c993693e9e63 wasm
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 14 Nov 2017 17:26:10 +0100 |
parents | ed0003f6102c |
children | a823122db53d |
comparison
equal
deleted
inserted
replaced
127:b963f3a9a86c | 128:c993693e9e63 |
---|---|
25 #include "../Toolbox/IWebService.h" | 25 #include "../Toolbox/IWebService.h" |
26 #include "LayerSourceBase.h" | 26 #include "LayerSourceBase.h" |
27 | 27 |
28 namespace OrthancStone | 28 namespace OrthancStone |
29 { | 29 { |
30 class DicomStructureSetRendererFactory : | 30 class DicomStructureSetRendererFactory : public LayerSourceBase |
31 public LayerSourceBase, | |
32 private IWebService::ICallback | |
33 { | 31 { |
34 private: | 32 private: |
35 class Renderer; | 33 class Renderer; |
36 class Operation; | 34 class Operation; |
35 | |
36 class Loader : public IWebService::ICallback | |
37 { | |
38 private: | |
39 DicomStructureSetRendererFactory& that_; | |
40 | |
41 public: | |
42 Loader(DicomStructureSetRendererFactory& that) : | |
43 that_(that) | |
44 { | |
45 } | |
46 | |
47 virtual void NotifyError(const std::string& uri, | |
48 Orthanc::IDynamicObject* payload) | |
49 { | |
50 that_.NotifyError(uri, payload); | |
51 } | |
52 | |
53 virtual void NotifySuccess(const std::string& uri, | |
54 const void* answer, | |
55 size_t answerSize, | |
56 Orthanc::IDynamicObject* payload) | |
57 { | |
58 that_.NotifySuccess(uri, answer, answerSize, payload); | |
59 } | |
60 }; | |
37 | 61 |
38 virtual void NotifyError(const std::string& uri, | 62 virtual void NotifyError(const std::string& uri, |
39 Orthanc::IDynamicObject* payload); | 63 Orthanc::IDynamicObject* payload); |
40 | 64 |
41 virtual void NotifySuccess(const std::string& uri, | 65 virtual void NotifySuccess(const std::string& uri, |
42 const void* answer, | 66 const void* answer, |
43 size_t answerSize, | 67 size_t answerSize, |
44 Orthanc::IDynamicObject* payload); | 68 Orthanc::IDynamicObject* payload); |
45 | 69 |
70 Loader loader_; | |
46 IWebService& orthanc_; | 71 IWebService& orthanc_; |
47 std::auto_ptr<DicomStructureSet> structureSet_; | 72 std::auto_ptr<DicomStructureSet> structureSet_; |
48 | 73 |
49 public: | 74 public: |
50 DicomStructureSetRendererFactory(IWebService& orthanc, | 75 DicomStructureSetRendererFactory(IWebService& orthanc); |
51 const std::string& instance); | 76 |
77 void ScheduleLoadInstance(const std::string& instance); | |
52 | 78 |
53 virtual bool GetExtent(std::vector<Vector>& points, | 79 virtual bool GetExtent(std::vector<Vector>& points, |
54 const CoordinateSystem3D& viewportSlice) | 80 const CoordinateSystem3D& viewportSlice) |
55 { | 81 { |
56 return false; | 82 return false; |