diff OrthancStone/Sources/Loaders/LoadedDicomResources.cpp @ 2091:35de56fb6f89 dicom-sr

support of referenced instances
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 08 Nov 2023 10:11:21 +0100
parents 07964689cb0b
children c23eef785569
line wrap: on
line diff
--- a/OrthancStone/Sources/Loaders/LoadedDicomResources.cpp	Tue Nov 07 19:35:48 2023 +0100
+++ b/OrthancStone/Sources/Loaders/LoadedDicomResources.cpp	Wed Nov 08 10:11:21 2023 +0100
@@ -276,4 +276,22 @@
       return true;
     }
   }
+
+
+  bool LoadedDicomResources::LookupResource(Orthanc::DicomMap& target,
+                                            const std::string& id) const
+  {
+    Resources::const_iterator it = resources_.find(id);
+    
+    if (it == resources_.end())
+    {
+      return false;
+    }
+    else
+    {
+      assert(it->second != NULL);
+      target.Assign(it->second->GetDicom());
+      return true;
+    }
+  }
 }