Mercurial > hg > orthanc
comparison OrthancServer/OrthancRestApi/OrthancRestResources.cpp @ 3012:af1530b45290
Optimization: On finds, do not read JSON (disk) if main DICOM tags (DB) are sufficient
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 13 Dec 2018 17:54:06 +0100 |
parents | 5ae3ff2398e9 |
children | 2cbafb5d5a62 |
comparison
equal
deleted
inserted
replaced
3010:9f859a18cbc2 | 3012:af1530b45290 |
---|---|
1281 FindVisitor() : | 1281 FindVisitor() : |
1282 isComplete_(false) | 1282 isComplete_(false) |
1283 { | 1283 { |
1284 } | 1284 } |
1285 | 1285 |
1286 virtual bool IsDicomAsJsonNeeded() const | |
1287 { | |
1288 return false; // (*) | |
1289 } | |
1290 | |
1286 virtual void MarkAsComplete() | 1291 virtual void MarkAsComplete() |
1287 { | 1292 { |
1288 isComplete_ = true; // Unused information as of Orthanc 1.5.0 | 1293 isComplete_ = true; // Unused information as of Orthanc 1.5.0 |
1289 } | 1294 } |
1290 | 1295 |
1291 virtual void Visit(const std::string& publicId, | 1296 virtual void Visit(const std::string& publicId, |
1292 const std::string& instanceId /* unused */, | 1297 const std::string& instanceId /* unused */, |
1293 const Json::Value& dicom /* unused */) | 1298 const DicomMap& mainDicomTags /* unused */, |
1299 const Json::Value* dicomAsJson /* unused (*) */) | |
1294 { | 1300 { |
1295 resources_.push_back(publicId); | 1301 resources_.push_back(publicId); |
1296 } | 1302 } |
1297 | 1303 |
1298 void Answer(RestApiOutput& output, | 1304 void Answer(RestApiOutput& output, |