Mercurial > hg > orthanc
comparison OrthancServer/Sources/Search/DatabaseLookup.cpp @ 4932:b7ce2bb6b881 more-tags
refactored the list of MainDicomTags to be able to change it dynamicaly. Unit tests and Integration tests ok
author | Alain Mazy <am@osimis.io> |
---|---|
date | Wed, 09 Mar 2022 11:17:08 +0100 |
parents | 6eff25f70121 |
children | dad71e6da406 |
comparison
equal
deleted
inserted
replaced
4930:1ce32c1ec4cf | 4932:b7ce2bb6b881 |
---|---|
279 } | 279 } |
280 | 280 |
281 | 281 |
282 bool DatabaseLookup::HasOnlyMainDicomTags() const | 282 bool DatabaseLookup::HasOnlyMainDicomTags() const |
283 { | 283 { |
284 std::set<DicomTag> mainTags; | 284 const std::set<DicomTag>& allMainTags = DicomMap::GetAllMainDicomTags(); |
285 DicomMap::GetMainDicomTags(mainTags); | |
286 | 285 |
287 for (size_t i = 0; i < constraints_.size(); i++) | 286 for (size_t i = 0; i < constraints_.size(); i++) |
288 { | 287 { |
289 assert(constraints_[i] != NULL); | 288 assert(constraints_[i] != NULL); |
290 | 289 |
291 if (mainTags.find(constraints_[i]->GetTag()) == mainTags.end()) | 290 if (allMainTags.find(constraints_[i]->GetTag()) == allMainTags.end()) |
292 { | 291 { |
293 // This is not a main DICOM tag | 292 // This is not a main DICOM tag |
294 return false; | 293 return false; |
295 } | 294 } |
296 } | 295 } |