changeset 6010:89e2b1b7d283

merge
author Alain Mazy <am@orthanc.team>
date Wed, 19 Feb 2025 15:38:28 +0100
parents 1ddeb38049ea (diff) 5547f4c01253 (current diff)
children 6f6888ab5e5c
files
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/Sources/ResourceFinder.cpp	Tue Feb 18 18:13:18 2025 +0100
+++ b/OrthancServer/Sources/ResourceFinder.cpp	Wed Feb 19 15:38:28 2025 +0100
@@ -1148,6 +1148,14 @@
           Toolbox::RemoveSets(remainingRequestedTags, metaTagsToRemove);
         }
 
+        // if SOPClassUID has been requested, we might still find it at metadata level (useful e.g. for StoneViewer)
+        std::string sopClassUidFromMetadata;
+        if (resource.GetLevel() == ResourceType_Instance &&
+            remainingRequestedTags.find(DICOM_TAG_SOP_CLASS_UID) != remainingRequestedTags.end() && 
+            resource.LookupMetadata(sopClassUidFromMetadata, ResourceType_Instance, MetadataType_Instance_SopClassUid))
+        {
+          outRequestedTags.SetValue(DICOM_TAG_SOP_CLASS_UID, sopClassUidFromMetadata, false);
+        }
 
         if (!remainingRequestedTags.empty() && 
             !DicomMap::HasOnlyComputedTags(remainingRequestedTags)) // if the only remaining tags are computed tags, it is worthless to read them from disk