Mercurial > hg > orthanc-stone
comparison Framework/Loaders/LoadedDicomResources.cpp @ 1250:a8248b08115c broker
LoadedDicomResources::MergeResource()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 07 Jan 2020 20:22:02 +0100 |
parents | c471a0aa137b |
children | 0ca50d275b9a |
comparison
equal
deleted
inserted
replaced
1249:964c89e15e7e | 1250:a8248b08115c |
---|---|
98 return *flattened_[index]; | 98 return *flattened_[index]; |
99 } | 99 } |
100 } | 100 } |
101 | 101 |
102 | 102 |
103 void LoadedDicomResources::MergeResource(Orthanc::DicomMap& target, | |
104 const std::string& id) const | |
105 { | |
106 Resources::const_iterator it = resources_.find(id); | |
107 | |
108 if (it == resources_.end()) | |
109 { | |
110 throw Orthanc::OrthancException(Orthanc::ErrorCode_InexistentItem); | |
111 } | |
112 else | |
113 { | |
114 assert(it->second != NULL); | |
115 target.Merge(*it->second); | |
116 } | |
117 } | |
118 | |
119 | |
103 bool LoadedDicomResources::LookupStringValue(std::string& target, | 120 bool LoadedDicomResources::LookupStringValue(std::string& target, |
104 const std::string& id, | 121 const std::string& id, |
105 const Orthanc::DicomTag& tag) const | 122 const Orthanc::DicomTag& tag) const |
106 { | 123 { |
107 Resources::const_iterator found = resources_.find(id); | 124 Resources::const_iterator found = resources_.find(id); |