Mercurial > hg > orthanc
diff OrthancServer/ServerIndex.cpp @ 615:ec0b7a51d7bd find-move-scp
speed up find
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 24 Oct 2013 11:42:46 +0200 |
parents | b2357f1f026f |
children | fb49bf72ac2d |
line wrap: on
line diff
--- a/OrthancServer/ServerIndex.cpp Thu Oct 24 10:33:11 2013 +0200 +++ b/OrthancServer/ServerIndex.cpp Thu Oct 24 11:42:46 2013 +0200 @@ -1473,6 +1473,29 @@ void ServerIndex::LookupTagValue(std::list<std::string>& result, DicomTag tag, + const std::string& value, + ResourceType type) + { + result.clear(); + + boost::mutex::scoped_lock lock(mutex_); + + std::list<int64_t> id; + db_->LookupTagValue(id, tag, value); + + for (std::list<int64_t>::const_iterator + it = id.begin(); it != id.end(); it++) + { + if (db_->GetResourceType(*it) == type) + { + result.push_back(db_->GetPublicId(*it)); + } + } + } + + + void ServerIndex::LookupTagValue(std::list<std::string>& result, + DicomTag tag, const std::string& value) { result.clear();