comparison Framework/Volumes/StructureSetLoader.h @ 404:ba4ace20454e

use of MessageBroker in DicomStructureSetSlicer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sun, 11 Nov 2018 13:02:38 +0100
parents b4abaeb783b1
children b70e9be013e4
comparison
equal deleted inserted replaced
403:99e31898910e 404:ba4ace20454e
21 21
22 #pragma once 22 #pragma once
23 23
24 #include "../Toolbox/DicomStructureSet.h" 24 #include "../Toolbox/DicomStructureSet.h"
25 #include "../Toolbox/OrthancApiClient.h" 25 #include "../Toolbox/OrthancApiClient.h"
26 #include "VolumeLoaderBase.h" 26 #include "IVolumeLoader.h"
27 27
28 namespace OrthancStone 28 namespace OrthancStone
29 { 29 {
30 class StructureSetLoader : 30 class StructureSetLoader :
31 public VolumeLoaderBase, 31 public IVolumeLoader,
32 public OrthancStone::IObserver 32 public IObserver
33 { 33 {
34 private: 34 private:
35 35 OrthancApiClient& orthanc_;
36 OrthancApiClient& orthanc_;
37 std::auto_ptr<DicomStructureSet> structureSet_; 36 std::auto_ptr<DicomStructureSet> structureSet_;
38 37
38 void OnReferencedSliceLoaded(const OrthancApiClient::JsonResponseReadyMessage& message);
39
40 void OnStructureSetLoaded(const OrthancApiClient::JsonResponseReadyMessage& message);
41
42 void OnLookupCompleted(const OrthancApiClient::JsonResponseReadyMessage& message);
43
39 public: 44 public:
40 StructureSetLoader(MessageBroker& broker, OrthancApiClient& orthanc); 45 StructureSetLoader(MessageBroker& broker,
46 OrthancApiClient& orthanc);
41 47
42 void ScheduleLoadInstance(const std::string& instance); 48 void ScheduleLoadInstance(const std::string& instance);
43 49
44 bool HasStructureSet() const 50 bool HasStructureSet() const
45 { 51 {
46 return structureSet_.get() != NULL; 52 return structureSet_.get() != NULL;
47 } 53 }
48 54
49 DicomStructureSet& GetStructureSet(); 55 DicomStructureSet& GetStructureSet();
50
51 protected:
52 void OnReferencedSliceLoaded(const OrthancApiClient::JsonResponseReadyMessage& message);
53
54 void OnStructureSetLoaded(const OrthancApiClient::JsonResponseReadyMessage& message);
55
56 void OnLookupCompleted(const OrthancApiClient::JsonResponseReadyMessage& message);
57 }; 56 };
58 } 57 }