comparison OrthancStone/Sources/Loaders/DicomStructureSetLoader.h @ 1640:52b8b96cb55f

cleaning namespaces
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 10 Nov 2020 16:55:22 +0100
parents 8563ea5d8ae4
children 9ac2a65d4172
comparison
equal deleted inserted replaced
1639:5cdc5b98f14d 1640:52b8b96cb55f
31 31
32 namespace OrthancStone 32 namespace OrthancStone
33 { 33 {
34 class DicomStructureSetLoader : 34 class DicomStructureSetLoader :
35 public LoaderStateMachine, 35 public LoaderStateMachine,
36 public OrthancStone::IVolumeSlicer, 36 public IVolumeSlicer,
37 public OrthancStone::IObservable 37 public IObservable
38 { 38 {
39 public: 39 public:
40 ORTHANC_STONE_DEFINE_ORIGIN_MESSAGE(__FILE__, __LINE__, StructuresReady, DicomStructureSetLoader); 40 ORTHANC_STONE_DEFINE_ORIGIN_MESSAGE(__FILE__, __LINE__, StructuresReady, DicomStructureSetLoader);
41 ORTHANC_STONE_DEFINE_ORIGIN_MESSAGE(__FILE__, __LINE__, StructuresUpdated, DicomStructureSetLoader); 41 ORTHANC_STONE_DEFINE_ORIGIN_MESSAGE(__FILE__, __LINE__, StructuresUpdated, DicomStructureSetLoader);
42 42
60 60
61 // predeclaration of the default IInstanceLookupHandler implementation 61 // predeclaration of the default IInstanceLookupHandler implementation
62 class RestInstanceLookupHandler; 62 class RestInstanceLookupHandler;
63 63
64 static boost::shared_ptr<DicomStructureSetLoader> Create( 64 static boost::shared_ptr<DicomStructureSetLoader> Create(
65 OrthancStone::ILoadersContext& loadersContext); 65 ILoadersContext& loadersContext);
66 66
67 void SetInstanceLookupHandler(boost::shared_ptr<IInstanceLookupHandler> instanceLookupHandler) 67 void SetInstanceLookupHandler(boost::shared_ptr<IInstanceLookupHandler> instanceLookupHandler)
68 { 68 {
69 instanceLookupHandler_ = instanceLookupHandler; 69 instanceLookupHandler_ = instanceLookupHandler;
70 } 70 }
71 71
72 OrthancStone::DicomStructureSet* GetContent() 72 DicomStructureSet* GetContent()
73 { 73 {
74 return content_.get(); 74 return content_.get();
75 } 75 }
76 76
77 void SetStructureDisplayState(size_t structureIndex, bool display); 77 void SetStructureDisplayState(size_t structureIndex, bool display);
87 const std::vector<std::string>& initiallyVisibleStructures = std::vector<std::string>()); 87 const std::vector<std::string>& initiallyVisibleStructures = std::vector<std::string>());
88 88
89 void LoadInstanceFullVisibility(const std::string& instanceId); 89 void LoadInstanceFullVisibility(const std::string& instanceId);
90 90
91 91
92 virtual IExtractedSlice* ExtractSlice(const OrthancStone::CoordinateSystem3D& cuttingPlane) ORTHANC_OVERRIDE; 92 virtual IExtractedSlice* ExtractSlice(const CoordinateSystem3D& cuttingPlane) ORTHANC_OVERRIDE;
93 93
94 void SetStructuresReady(); 94 void SetStructuresReady();
95 void SetStructuresUpdated(); 95 void SetStructuresUpdated();
96 96
97 bool AreStructuresReady() const; 97 bool AreStructuresReady() const;
106 class Slice; 106 class Slice;
107 107
108 // Only state of LoaderStateMachine 108 // Only state of LoaderStateMachine
109 class LoadStructure; // 1st state 109 class LoadStructure; // 1st state
110 110
111 OrthancStone::ILoadersContext& loadersContext_; 111 ILoadersContext& loadersContext_;
112 std::unique_ptr<OrthancStone::DicomStructureSet> content_; 112 std::unique_ptr<DicomStructureSet> content_;
113 uint64_t revision_; 113 uint64_t revision_;
114 std::string instanceId_; 114 std::string instanceId_;
115 unsigned int countProcessedInstances_; 115 unsigned int countProcessedInstances_;
116 unsigned int countReferencedInstances_; 116 unsigned int countReferencedInstances_;
117 117
118 // will be set to true once the loading is finished 118 // will be set to true once the loading is finished
119 bool structuresReady_; 119 bool structuresReady_;
120 120
121 /** 121 /**
122 At load time, these strings are used to initialize the structureVisibility_ 122 At load time, these strings are used to initialize the structureVisibility_
123 vector. 123 vector.
124 124
140 140
141 private: 141 private:
142 void RetrieveReferencedSlices(const std::set<std::string>& nonEmptyInstances); 142 void RetrieveReferencedSlices(const std::set<std::string>& nonEmptyInstances);
143 143
144 protected: 144 protected:
145 explicit DicomStructureSetLoader(OrthancStone::ILoadersContext& loadersContext); 145 explicit DicomStructureSetLoader(ILoadersContext& loadersContext);
146 }; 146 };
147 } 147 }