diff OrthancStone/Sources/Loaders/LoadedDicomResources.cpp @ 2094:7c3d65166c26

partial integration dicom-sr->mainline
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 08 Nov 2023 14:54:15 +0100
parents 07964689cb0b
children c23eef785569
line wrap: on
line diff
--- a/OrthancStone/Sources/Loaders/LoadedDicomResources.cpp	Tue Nov 07 18:11:13 2023 +0100
+++ b/OrthancStone/Sources/Loaders/LoadedDicomResources.cpp	Wed Nov 08 14:54:15 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;
+    }
+  }
 }