diff OrthancServer/QueryRetrieveHandler.cpp @ 3370:872bd3b6ec72

"/modalities/{id}/query": New argument "Normalize"
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 14 May 2019 10:30:43 +0200
parents d9eb978a1039
children 94f4a18a79cc
line wrap: on
line diff
--- a/OrthancServer/QueryRetrieveHandler.cpp	Tue May 14 10:03:11 2019 +0200
+++ b/OrthancServer/QueryRetrieveHandler.cpp	Tue May 14 10:30:43 2019 +0200
@@ -62,21 +62,6 @@
   }
 
 
-  static void FixQueryBuiltin(DicomMap& query,
-                              ModalityManufacturer manufacturer)
-  {
-    /**
-     * Introduce patches for specific manufacturers below.
-     **/
-
-    switch (manufacturer)
-    {
-      default:
-        break;
-    }
-  }
-
-
   void QueryRetrieveHandler::Invalidate()
   {
     done_ = false;
@@ -91,7 +76,6 @@
       // Firstly, fix the content of the query for specific manufacturers
       DicomMap fixed;
       fixed.Assign(query_);
-      FixQueryBuiltin(fixed, modality_.GetManufacturer());
 
       // Secondly, possibly fix the query with the user-provider Lua callback
       FixQueryLua(fixed, context_, modality_.GetApplicationEntityTitle()); 
@@ -99,7 +83,7 @@
       {
         DicomUserConnection connection(localAet_, modality_);
         connection.Open();
-        connection.Find(answers_, level_, fixed);
+        connection.Find(answers_, level_, fixed, findNormalized_);
       }
 
       done_ = true;
@@ -112,7 +96,8 @@
     localAet_(context.GetDefaultLocalApplicationEntityTitle()),
     done_(false),
     level_(ResourceType_Study),
-    answers_(false)
+    answers_(false),
+    findNormalized_(true)
   {
   }
 
@@ -175,4 +160,11 @@
     Run();
     answers_.GetAnswer(i).ExtractDicomSummary(target);
   }
+
+  
+  void QueryRetrieveHandler::SetFindNormalized(bool normalized)
+  {
+    Invalidate();
+    findNormalized_ = normalized;
+  }
 }