Mercurial > hg > orthanc
comparison OrthancServer/ServerIndex.cpp @ 521:2c739f76d0bb
lookup tag values
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 29 Aug 2013 14:50:23 +0200 |
parents | 935e8c7e0b18 |
children | b2357f1f026f |
comparison
equal
deleted
inserted
replaced
519:1b2cdc855bd3 | 521:2c739f76d0bb |
---|---|
1466 type == Orthanc::ResourceType_Series); | 1466 type == Orthanc::ResourceType_Series); |
1467 | 1467 |
1468 unstableResources_.AddOrMakeMostRecent(id, type); | 1468 unstableResources_.AddOrMakeMostRecent(id, type); |
1469 //LOG(INFO) << "Unstable resource: " << EnumerationToString(type) << " " << id; | 1469 //LOG(INFO) << "Unstable resource: " << EnumerationToString(type) << " " << id; |
1470 } | 1470 } |
1471 | |
1472 | |
1473 | |
1474 void ServerIndex::LookupTagValue(std::list<std::string>& result, | |
1475 DicomTag tag, | |
1476 const std::string& value) | |
1477 { | |
1478 result.clear(); | |
1479 | |
1480 boost::mutex::scoped_lock lock(mutex_); | |
1481 | |
1482 std::list<int64_t> id; | |
1483 db_->LookupTagValue(id, tag, value); | |
1484 | |
1485 for (std::list<int64_t>::const_iterator | |
1486 it = id.begin(); it != id.end(); it++) | |
1487 { | |
1488 result.push_back(db_->GetPublicId(*it)); | |
1489 } | |
1490 } | |
1491 | |
1492 | |
1493 void ServerIndex::LookupTagValue(std::list<std::string>& result, | |
1494 const std::string& value) | |
1495 { | |
1496 result.clear(); | |
1497 | |
1498 boost::mutex::scoped_lock lock(mutex_); | |
1499 | |
1500 std::list<int64_t> id; | |
1501 db_->LookupTagValue(id, value); | |
1502 | |
1503 for (std::list<int64_t>::const_iterator | |
1504 it = id.begin(); it != id.end(); it++) | |
1505 { | |
1506 result.push_back(db_->GetPublicId(*it)); | |
1507 } | |
1508 } | |
1471 } | 1509 } |