annotate Framework/Loaders/DicomStructureSetLoader.h @ 1443:60e30d73e2aa loader-injection-feature

ISliceProcessor is now public
author Benjamin Golinvaux <bgo@osimis.io>
date Tue, 26 May 2020 11:56:16 +0200
parents d959bc8f6c1b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
815
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Stone of Orthanc
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
1271
0ca50d275b9a upgrade to year 2020
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1225
diff changeset
5 * Copyright (C) 2017-2020 Osimis S.A., Belgium
815
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * modify it under the terms of the GNU Affero General Public License
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * as published by the Free Software Foundation, either version 3 of
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * the License, or (at your option) any later version.
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful, but
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * Affero General Public License for more details.
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 *
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * You should have received a copy of the GNU Affero General Public License
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 **/
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 #pragma once
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
1339
556b4bc19118 The loaders have been adapter to the nobroker architecture
Benjamin Golinvaux <bgo@osimis.io>
parents: 1337
diff changeset
24 #include "../Toolbox/DicomStructureSet.h"
556b4bc19118 The loaders have been adapter to the nobroker architecture
Benjamin Golinvaux <bgo@osimis.io>
parents: 1337
diff changeset
25 #include "../Volumes/IVolumeSlicer.h"
556b4bc19118 The loaders have been adapter to the nobroker architecture
Benjamin Golinvaux <bgo@osimis.io>
parents: 1337
diff changeset
26 #include "../Loaders/ILoadersContext.h"
815
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 #include "LoaderStateMachine.h"
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28
1019
29f5f2031310 Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents: 1000
diff changeset
29 #include <vector>
29f5f2031310 Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents: 1000
diff changeset
30
1337
b1396be5aa27 Moved the fixed loaders back from the dead
Benjamin Golinvaux <bgo@osimis.io>
parents: 1314
diff changeset
31 namespace OrthancStone
815
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 {
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 class DicomStructureSetLoader :
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 public LoaderStateMachine,
1225
16738485e457 deprecating DicomStructureSetLoader, OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1030
diff changeset
35 public OrthancStone::IVolumeSlicer,
16738485e457 deprecating DicomStructureSetLoader, OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1030
diff changeset
36 public OrthancStone::IObservable
815
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 {
1416
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
38 public:
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
39 ORTHANC_STONE_DEFINE_ORIGIN_MESSAGE(__FILE__, __LINE__, StructuresReady, DicomStructureSetLoader);
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
40 ORTHANC_STONE_DEFINE_ORIGIN_MESSAGE(__FILE__, __LINE__, StructuresUpdated, DicomStructureSetLoader);
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
41
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
42 /**
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
43
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
44 Once the structure set has been loaded (the LoadStructure state), we need to fill it with geometry information
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
45 from the referenced slices (tag (0008,1155) described here:
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
46 https://dicom.innolitics.com/ciods/rt-structure-set/general-reference/00081140/00081155
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
47
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
48 This interface allows to customize how this information can be gathered. By default, the RestInstanceLookupHandler
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
49 will perform a REST call to the Orthanc API to retrieve this information.
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
50
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
51 Injecting another implementation of this interface is useful when where this information can be supplied in
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
52 another (faster) way (for instance, if a separate loader for the CT series can be used to supply the slice geometry)
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
53 */
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
54 class IInstanceLookupHandler
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
55 {
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
56 public:
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
57 virtual void RetrieveReferencedSlices(const std::set<std::string>& instances) = 0;
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
58 };
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
59
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
60 // predeclaration of the default IInstanceLookupHandler implementation
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
61 class RestInstanceLookupHandler;
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
62
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
63 static boost::shared_ptr<DicomStructureSetLoader> Create(
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
64 OrthancStone::ILoadersContext& loadersContext);
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
65
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
66 void SetInstanceLookupHandler(boost::shared_ptr<IInstanceLookupHandler> instanceLookupHandler)
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
67 {
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
68 instanceLookupHandler_ = instanceLookupHandler;
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
69 }
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
70
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
71 OrthancStone::DicomStructureSet* GetContent()
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
72 {
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
73 return content_.get();
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
74 }
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
75
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
76 void SetStructureDisplayState(size_t structureIndex, bool display);
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
77
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
78 bool GetStructureDisplayState(size_t structureIndex) const
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
79 {
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
80 return structureVisibility_.at(structureIndex);
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
81 }
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
82
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
83 ~DicomStructureSetLoader();
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
84
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
85 void LoadInstance(const std::string& instanceId,
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
86 const std::vector<std::string>& initiallyVisibleStructures = std::vector<std::string>());
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
87
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
88 void LoadInstanceFullVisibility(const std::string& instanceId);
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
89
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
90
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
91 virtual IExtractedSlice* ExtractSlice(const OrthancStone::CoordinateSystem3D& cuttingPlane) ORTHANC_OVERRIDE;
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
92
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
93 void SetStructuresReady();
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
94 void SetStructuresUpdated();
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
95
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
96 bool AreStructuresReady() const;
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
97
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
98 /**
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
99 Called by the IInstanceLookupHandler when slice referenced instance information is available.
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
100 When the last referenced slice is received, this method will perform a final check and will warn observers
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
101 */
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
102 void AddReferencedSlice(const Orthanc::DicomMap& dicom);
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
103
815
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 private:
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 class Slice;
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106
1416
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
107 // Only state of LoaderStateMachine
815
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 class LoadStructure; // 1st state
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109
1310
9bea7e15b519 - first pass at changes to cope with the refactoring of the loading system
Benjamin Golinvaux <bgo@osimis.io>
parents: 1300
diff changeset
110 OrthancStone::ILoadersContext& loadersContext_;
1299
c38c89684d83 replacing std::auto_ptr by std::unique_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1279
diff changeset
111 std::unique_ptr<OrthancStone::DicomStructureSet> content_;
1310
9bea7e15b519 - first pass at changes to cope with the refactoring of the loading system
Benjamin Golinvaux <bgo@osimis.io>
parents: 1300
diff changeset
112 uint64_t revision_;
9bea7e15b519 - first pass at changes to cope with the refactoring of the loading system
Benjamin Golinvaux <bgo@osimis.io>
parents: 1300
diff changeset
113 std::string instanceId_;
9bea7e15b519 - first pass at changes to cope with the refactoring of the loading system
Benjamin Golinvaux <bgo@osimis.io>
parents: 1300
diff changeset
114 unsigned int countProcessedInstances_;
9bea7e15b519 - first pass at changes to cope with the refactoring of the loading system
Benjamin Golinvaux <bgo@osimis.io>
parents: 1300
diff changeset
115 unsigned int countReferencedInstances_;
937
86ac61a040c9 Added getters and notifications to allow clients of the loaders (DicomStructureSetLoader, OrthancSeriesVolumeProgressiveLoader and OrthancMultiframeVolumeLoader) to know when the loading is finished + added ability for SDL event loop to execute a callback repeatedly (used to check the view loading state)
Benjamin Golinvaux <bgo@osimis.io>
parents: 935
diff changeset
116
86ac61a040c9 Added getters and notifications to allow clients of the loaders (DicomStructureSetLoader, OrthancSeriesVolumeProgressiveLoader and OrthancMultiframeVolumeLoader) to know when the loading is finished + added ability for SDL event loop to execute a callback repeatedly (used to check the view loading state)
Benjamin Golinvaux <bgo@osimis.io>
parents: 935
diff changeset
117 // will be set to true once the loading is finished
1310
9bea7e15b519 - first pass at changes to cope with the refactoring of the loading system
Benjamin Golinvaux <bgo@osimis.io>
parents: 1300
diff changeset
118 bool structuresReady_;
1019
29f5f2031310 Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents: 1000
diff changeset
119
29f5f2031310 Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents: 1000
diff changeset
120 /**
1030
7014c2397b45 Empty structureNames now means NOTHING will be (initially) displayed
Benjamin Golinvaux <bgo@osimis.io>
parents: 1019
diff changeset
121 At load time, these strings are used to initialize the structureVisibility_
7014c2397b45 Empty structureNames now means NOTHING will be (initially) displayed
Benjamin Golinvaux <bgo@osimis.io>
parents: 1019
diff changeset
122 vector.
1019
29f5f2031310 Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents: 1000
diff changeset
123
1030
7014c2397b45 Empty structureNames now means NOTHING will be (initially) displayed
Benjamin Golinvaux <bgo@osimis.io>
parents: 1019
diff changeset
124 As a special case, if initiallyVisibleStructures_ contains a single string
7014c2397b45 Empty structureNames now means NOTHING will be (initially) displayed
Benjamin Golinvaux <bgo@osimis.io>
parents: 1019
diff changeset
125 that is '*', ALL structures will be made visible.
1019
29f5f2031310 Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents: 1000
diff changeset
126 */
29f5f2031310 Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents: 1000
diff changeset
127 std::vector<std::string> initiallyVisibleStructures_;
29f5f2031310 Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents: 1000
diff changeset
128
29f5f2031310 Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents: 1000
diff changeset
129 /**
29f5f2031310 Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents: 1000
diff changeset
130 Contains the "Should this structure be displayed?" flag for all structures.
29f5f2031310 Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents: 1000
diff changeset
131 Only filled when structures are loaded.
29f5f2031310 Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents: 1000
diff changeset
132
29f5f2031310 Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents: 1000
diff changeset
133 Changing this value directly affects the rendering
29f5f2031310 Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents: 1000
diff changeset
134 */
29f5f2031310 Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents: 1000
diff changeset
135 std::vector<bool> structureVisibility_;
29f5f2031310 Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents: 1000
diff changeset
136
1416
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
137
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
138 boost::shared_ptr<IInstanceLookupHandler> instanceLookupHandler_;
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
139
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
140 private:
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
141 void RetrieveReferencedSlices(const std::set<std::string>& nonEmptyInstances);
d959bc8f6c1b Instance lookup is now performed in a separate class through an interface. Another implementation can be injected (SetInstanceLookupHandler)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1385
diff changeset
142
1314
9b126de2cde2 Since the observer system now uses shared_ptr and many registrations are
Benjamin Golinvaux <bgo@osimis.io>
parents: 1310
diff changeset
143 protected:
9b126de2cde2 Since the observer system now uses shared_ptr and many registrations are
Benjamin Golinvaux <bgo@osimis.io>
parents: 1310
diff changeset
144 DicomStructureSetLoader(OrthancStone::ILoadersContext& loadersContext);
815
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145 };
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146 }