annotate OrthancStone/Sources/Loaders/DicomStructureSetLoader.h @ 1615:f5d4bd7b5593

new class: OsiriXLayerFactory
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 30 Oct 2020 17:26:44 +0100
parents 8563ea5d8ae4
children 52b8b96cb55f
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
1598
8563ea5d8ae4 relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
8 * modify it under the terms of the GNU Lesser General Public License
815
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
1598
8563ea5d8ae4 relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8563ea5d8ae4 relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
15 * Lesser General Public License for more details.
1596
4fb8fdf03314 removed annoying whitespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1571
diff changeset
16 *
1598
8563ea5d8ae4 relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
17 * You should have received a copy of the GNU Lesser General Public
8563ea5d8ae4 relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
18 * License along with this program. If not, see
8563ea5d8ae4 relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
19 * <http://www.gnu.org/licenses/>.
815
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
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 #pragma once
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24
1339
556b4bc19118 The loaders have been adapter to the nobroker architecture
Benjamin Golinvaux <bgo@osimis.io>
parents: 1337
diff changeset
25 #include "../Toolbox/DicomStructureSet.h"
556b4bc19118 The loaders have been adapter to the nobroker architecture
Benjamin Golinvaux <bgo@osimis.io>
parents: 1337
diff changeset
26 #include "../Volumes/IVolumeSlicer.h"
556b4bc19118 The loaders have been adapter to the nobroker architecture
Benjamin Golinvaux <bgo@osimis.io>
parents: 1337
diff changeset
27 #include "../Loaders/ILoadersContext.h"
815
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 #include "LoaderStateMachine.h"
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29
1019
29f5f2031310 Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents: 1000
diff changeset
30 #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
31
1337
b1396be5aa27 Moved the fixed loaders back from the dead
Benjamin Golinvaux <bgo@osimis.io>
parents: 1314
diff changeset
32 namespace OrthancStone
815
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 {
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 class DicomStructureSetLoader :
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 public LoaderStateMachine,
1225
16738485e457 deprecating DicomStructureSetLoader, OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1030
diff changeset
36 public OrthancStone::IVolumeSlicer,
16738485e457 deprecating DicomStructureSetLoader, OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1030
diff changeset
37 public OrthancStone::IObservable
815
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 {
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
39 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
40 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
41 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
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
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 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
46 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
47 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
48
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 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
50 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
51
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 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
53 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
54 */
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 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
56 {
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 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
58 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
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
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 // 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
62 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
63
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 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
65 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
66
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 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
68 {
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 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
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
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 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
73 {
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 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
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
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 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
78
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 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
80 {
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 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
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
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 ~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
85
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 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
87 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
88
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 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
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
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 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
93
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 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
95 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
96
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 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
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 /**
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 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
101 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
102 */
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 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
104
815
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 private:
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 class Slice;
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107
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
108 // Only state of LoaderStateMachine
815
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109 class LoadStructure; // 1st state
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110
1310
9bea7e15b519 - first pass at changes to cope with the refactoring of the loading system
Benjamin Golinvaux <bgo@osimis.io>
parents: 1300
diff changeset
111 OrthancStone::ILoadersContext& loadersContext_;
1299
c38c89684d83 replacing std::auto_ptr by std::unique_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1279
diff changeset
112 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
113 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
114 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
115 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
116 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
117
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
118 // 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
119 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
120
29f5f2031310 Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents: 1000
diff changeset
121 /**
1030
7014c2397b45 Empty structureNames now means NOTHING will be (initially) displayed
Benjamin Golinvaux <bgo@osimis.io>
parents: 1019
diff changeset
122 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
123 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
124
1030
7014c2397b45 Empty structureNames now means NOTHING will be (initially) displayed
Benjamin Golinvaux <bgo@osimis.io>
parents: 1019
diff changeset
125 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
126 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
127 */
29f5f2031310 Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents: 1000
diff changeset
128 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
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 /**
29f5f2031310 Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents: 1000
diff changeset
131 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
132 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
133
29f5f2031310 Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents: 1000
diff changeset
134 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
135 */
29f5f2031310 Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents: 1000
diff changeset
136 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
137
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
138
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 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
140
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 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
142 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
143
1314
9b126de2cde2 Since the observer system now uses shared_ptr and many registrations are
Benjamin Golinvaux <bgo@osimis.io>
parents: 1310
diff changeset
144 protected:
1571
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1512
diff changeset
145 explicit DicomStructureSetLoader(OrthancStone::ILoadersContext& loadersContext);
815
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146 };
df442f1ba0c6 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 }