changeset 1708:275780da54ae db-changes

integration mainline->db-changes
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 13 Oct 2015 16:57:55 +0200
parents d2268c7a7ede (current diff) 9a04ad916831 (diff)
children 2ad22b2970a2
files
diffstat 2 files changed, 12 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/Core/DicomFormat/DicomMap.cpp	Tue Oct 13 16:30:48 2015 +0200
+++ b/Core/DicomFormat/DicomMap.cpp	Tue Oct 13 16:57:55 2015 +0200
@@ -285,6 +285,7 @@
     result.Remove(DICOM_TAG_NUMBER_OF_SLICES);
     result.Remove(DICOM_TAG_NUMBER_OF_TEMPORAL_POSITIONS);
     result.Remove(DICOM_TAG_NUMBER_OF_TIME_SLICES);
+    result.Remove(DICOM_TAG_IMAGE_ORIENTATION_PATIENT);
   }
 
   void DicomMap::SetupFindInstanceTemplate(DicomMap& result)
--- a/OrthancServer/DicomProtocol/DicomUserConnection.cpp	Tue Oct 13 16:30:48 2015 +0200
+++ b/OrthancServer/DicomProtocol/DicomUserConnection.cpp	Tue Oct 13 16:57:55 2015 +0200
@@ -384,8 +384,9 @@
   }
 
 
-  static void CheckFindQuery(ResourceType level,
-                             const DicomMap& fields)
+  static void FixFindQuery(DicomMap& fixedQuery,
+                           ResourceType level,
+                           const DicomMap& fields)
   {
     std::set<DicomTag> allowedTags;
 
@@ -422,8 +423,11 @@
       const DicomTag& tag = query.GetElement(i).GetTag();
       if (allowedTags.find(tag) == allowedTags.end())
       {
-        LOG(ERROR) << "Tag not allowed for this C-Find level: " << tag;
-        throw OrthancException(ErrorCode_BadRequest);
+        LOG(WARNING) << "Tag not allowed for this C-Find level, will be ignored: " << tag;
+      }
+      else
+      {
+        fixedQuery.SetValue(tag, query.GetElement(i).GetValue());
       }
     }
   }
@@ -471,9 +475,10 @@
 
   void DicomUserConnection::Find(DicomFindAnswers& result,
                                  ResourceType level,
-                                 const DicomMap& fields)
+                                 const DicomMap& originalFields)
   {
-    CheckFindQuery(level, fields);
+    DicomMap fields;
+    FixFindQuery(fields, level, originalFields);
 
     CheckIsOpen();