Mercurial > hg > orthanc
comparison OrthancServer/Sources/ServerContext.cpp @ 5669:f690568f0325
Fix C-Find queries not returning computed tags in very specific use-cases
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Fri, 05 Jul 2024 19:18:23 +0200 |
parents | f7adfb22e20e |
children | 56859a7ffa99 0c218d90096e |
comparison
equal
deleted
inserted
replaced
5662:d77292629430 | 5669:f690568f0325 |
---|---|
2576 resource.GetMainDicomTags().GetTags(retrievedTags); | 2576 resource.GetMainDicomTags().GetTags(retrievedTags); |
2577 | 2577 |
2578 Toolbox::GetMissingsFromSet(missingTags, requestedTags, retrievedTags); | 2578 Toolbox::GetMissingsFromSet(missingTags, requestedTags, retrievedTags); |
2579 | 2579 |
2580 // if all possible tags have been read, no need to get them from DB anymore | 2580 // if all possible tags have been read, no need to get them from DB anymore |
2581 if (missingTags.size() == 0 || DicomMap::HasOnlyComputedTags(missingTags)) | 2581 if (missingTags.size() > 0 && DicomMap::HasOnlyComputedTags(missingTags)) |
2582 { | |
2583 resource.missingRequestedTags_ = missingTags; | |
2584 ComputeTags(resource, *this, publicId, level, requestedTags); | |
2585 return true; | |
2586 } | |
2587 else if (missingTags.size() == 0) | |
2582 { | 2588 { |
2583 expandFlags = static_cast<ExpandResourceFlags>(expandFlags & ~ExpandResourceFlags_IncludeMainDicomTags); | 2589 expandFlags = static_cast<ExpandResourceFlags>(expandFlags & ~ExpandResourceFlags_IncludeMainDicomTags); |
2584 } | 2590 } |
2585 | 2591 |
2586 if (missingTags.size() == 0 && expandFlags == ExpandResourceFlags_None) // we have already retrieved anything we need | 2592 if (missingTags.size() == 0 && expandFlags == ExpandResourceFlags_None) // we have already retrieved anything we need |