Mercurial > hg > orthanc-stone
annotate OrthancStone/Sources/Loaders/SeriesMetadataLoader.h @ 1729:f62f5ee5a432
removing useless Version.cmake
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 02 Dec 2020 07:08:29 +0100 |
parents | 8563ea5d8ae4 |
children | 9ac2a65d4172 |
rev | line source |
---|---|
1228
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 /** |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 * Stone of Orthanc |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
c471a0aa137b
adding the next generation of loaders
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:
1228
diff
changeset
|
5 * Copyright (C) 2017-2020 Osimis S.A., Belgium |
1228
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 * |
c471a0aa137b
adding the next generation of loaders
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 |
1228
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
9 * as published by the Free Software Foundation, either version 3 of |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 * the License, or (at your option) any later version. |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 * |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 * This program is distributed in the hope that it will be useful, but |
c471a0aa137b
adding the next generation of loaders
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/>. |
1228
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 **/ |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 #pragma once |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 #include "DicomResourcesLoader.h" |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 namespace OrthancStone |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 { |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 class SeriesMetadataLoader : |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 public ObserverBase<SeriesMetadataLoader>, |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 public IObservable |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 { |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 private: |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 enum State |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 { |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 State_Setup, |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 State_Default, |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
38 State_DicomDir, |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 State_DicomFile |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
40 }; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
42 typedef std::map<std::string, boost::shared_ptr<LoadedDicomResources> > Series; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
43 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
44 boost::shared_ptr<DicomResourcesLoader> loader_; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
45 State state_; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
46 std::map<std::string, int> scheduled_; // Maps a "SeriesInstanceUID" to a priority |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
47 Series series_; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
48 boost::shared_ptr<LoadedDicomResources> dicomDir_; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
49 std::string dicomDirPath_; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
50 std::map<std::string, unsigned int> seriesSize_; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
51 |
1571 | 52 explicit SeriesMetadataLoader(boost::shared_ptr<DicomResourcesLoader>& loader); |
1228
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
53 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
54 bool IsScheduledWithHigherPriority(const std::string& seriesInstanceUid, |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
55 int priority) const; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
56 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
57 void Handle(const DicomResourcesLoader::SuccessMessage& message); |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
58 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
59 public: |
1476
4db187d29731
renamed SeriesMetadataLoader::SeriesLoadedMessage to SuccessMessage
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1271
diff
changeset
|
60 class SuccessMessage : public OriginMessage<SeriesMetadataLoader> |
1228
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
61 { |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
62 ORTHANC_STONE_MESSAGE(__FILE__, __LINE__); |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
63 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
64 private: |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
65 const DicomSource& source_; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
66 const std::string& studyInstanceUid_; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
67 const std::string& seriesInstanceUid_; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
68 LoadedDicomResources& instances_; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
69 std::string dicomDirPath_; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
70 boost::shared_ptr<LoadedDicomResources> dicomDir_; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
71 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
72 public: |
1476
4db187d29731
renamed SeriesMetadataLoader::SeriesLoadedMessage to SuccessMessage
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1271
diff
changeset
|
73 SuccessMessage(const SeriesMetadataLoader& loader, |
4db187d29731
renamed SeriesMetadataLoader::SeriesLoadedMessage to SuccessMessage
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1271
diff
changeset
|
74 const DicomSource& source, |
4db187d29731
renamed SeriesMetadataLoader::SeriesLoadedMessage to SuccessMessage
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1271
diff
changeset
|
75 const std::string& studyInstanceUid, |
4db187d29731
renamed SeriesMetadataLoader::SeriesLoadedMessage to SuccessMessage
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1271
diff
changeset
|
76 const std::string& seriesInstanceUid, |
4db187d29731
renamed SeriesMetadataLoader::SeriesLoadedMessage to SuccessMessage
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1271
diff
changeset
|
77 LoadedDicomResources& instances); |
1228
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
78 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
79 const DicomSource& GetDicomSource() const |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
80 { |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
81 return source_; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
82 } |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
83 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
84 const std::string& GetStudyInstanceUid() const |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
85 { |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
86 return studyInstanceUid_; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
87 } |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
88 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
89 const std::string& GetSeriesInstanceUid() const |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
90 { |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
91 return seriesInstanceUid_; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
92 } |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
93 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
94 size_t GetInstancesCount() const |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
95 { |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
96 return instances_.GetSize(); |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
97 } |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
98 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
99 const Orthanc::DicomMap& GetInstance(size_t index) const |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
100 { |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
101 return instances_.GetResource(index); |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
102 } |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
103 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
104 LoadedDicomResources& GetInstances() const |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
105 { |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
106 return instances_; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
107 } |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
108 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
109 void SetDicomDir(const std::string& dicomDirPath, |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
110 boost::shared_ptr<LoadedDicomResources> dicomDir) |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
111 { |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
112 dicomDirPath_ = dicomDirPath; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
113 dicomDir_ = dicomDir; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
114 } |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
115 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
116 const std::string& GetDicomDirPath() const |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
117 { |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
118 return dicomDirPath_; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
119 } |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
120 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
121 // Will be NULL on non-DICOMDIR sources |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
122 boost::shared_ptr<LoadedDicomResources> GetDicomDir() const |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
123 { |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
124 return dicomDir_; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
125 } |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
126 }; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
127 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
128 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
129 class Factory : public ILoaderFactory |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
130 { |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
131 public: |
1571 | 132 virtual boost::shared_ptr<IObserver> Create(ILoadersContext::ILock& context) ORTHANC_OVERRIDE |
1476
4db187d29731
renamed SeriesMetadataLoader::SeriesLoadedMessage to SuccessMessage
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1271
diff
changeset
|
133 { |
4db187d29731
renamed SeriesMetadataLoader::SeriesLoadedMessage to SuccessMessage
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1271
diff
changeset
|
134 return SeriesMetadataLoader::Create(context); |
4db187d29731
renamed SeriesMetadataLoader::SeriesLoadedMessage to SuccessMessage
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1271
diff
changeset
|
135 } |
1228
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
136 }; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
137 |
1476
4db187d29731
renamed SeriesMetadataLoader::SeriesLoadedMessage to SuccessMessage
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1271
diff
changeset
|
138 |
1571 | 139 static boost::shared_ptr<SeriesMetadataLoader> Create(const ILoadersContext::ILock& context); |
1476
4db187d29731
renamed SeriesMetadataLoader::SeriesLoadedMessage to SuccessMessage
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1271
diff
changeset
|
140 |
1228
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
141 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
142 class Accessor : public boost::noncopyable |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
143 { |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
144 private: |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
145 boost::shared_ptr<LoadedDicomResources> series_; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
146 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
147 public: |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
148 Accessor(SeriesMetadataLoader& that, |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
149 const std::string& seriesInstanceUid); |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
150 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
151 bool IsComplete() const |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
152 { |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
153 return series_ != NULL; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
154 } |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
155 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
156 size_t GetInstancesCount() const; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
157 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
158 const Orthanc::DicomMap& GetInstance(size_t index) const; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
159 }; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
160 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
161 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
162 void ScheduleLoadSeries(int priority, |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
163 const DicomSource& source, |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
164 const std::string& studyInstanceUid, |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
165 const std::string& seriesInstanceUid); |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
166 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
167 void ScheduleLoadSeries(int priority, |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
168 const DicomSource& source, |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
169 const std::string& patientId, |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
170 const std::string& studyInstanceUid, |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
171 const std::string& seriesInstanceUid); |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
172 |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
173 void ScheduleLoadDicomDir(int priority, |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
174 const DicomSource& source, |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
175 const std::string& path); |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
176 }; |
c471a0aa137b
adding the next generation of loaders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
177 } |