diff OrthancServer/QueryRetrieveHandler.cpp @ 2986:b1ba0a8311b5

exploring hierarchy of C-FIND answers finished
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 10 Dec 2018 10:03:41 +0100
parents 4767d36679ed
children 4e43e67f8ecf
line wrap: on
line diff
--- a/OrthancServer/QueryRetrieveHandler.cpp	Mon Dec 10 09:20:57 2018 +0100
+++ b/OrthancServer/QueryRetrieveHandler.cpp	Mon Dec 10 10:03:41 2018 +0100
@@ -142,6 +142,24 @@
   }
 
 
+  void QueryRetrieveHandler::CopyStringTag(const DicomMap& from,
+                                           const DicomTag& tag)
+  {
+    const DicomValue* value = from.TestAndGetValue(tag);
+
+    if (value == NULL ||
+        value->IsNull() ||
+        value->IsBinary())
+    {
+      throw OrthancException(ErrorCode_InexistentTag);
+    }
+    else
+    {
+      SetQuery(tag, value->GetContent());
+    }
+  }
+
+
   size_t QueryRetrieveHandler::GetAnswersCount()
   {
     Run();