diff Core/DicomNetworking/DicomFindAnswers.cpp @ 3276:9b0e67161600

More tolerance wrt. invalid DICOM files that must be returned by Orthanc C-FIND SCP
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 21 Feb 2019 10:21:12 +0100
parents b6e7714c3fe6
children 94f4a18a79cc
line wrap: on
line diff
--- a/Core/DicomNetworking/DicomFindAnswers.cpp	Wed Feb 20 17:21:39 2019 +0100
+++ b/Core/DicomNetworking/DicomFindAnswers.cpp	Thu Feb 21 10:21:12 2019 +0100
@@ -119,7 +119,10 @@
 
   void DicomFindAnswers::Add(const DicomMap& map)
   {
-    AddAnswerInternal(new ParsedDicomFile(map, encoding_));
+    // We use the permissive mode to be tolerant wrt. invalid DICOM
+    // files that contain some tags with out-of-range values (such
+    // tags are removed from the answers)
+    AddAnswerInternal(new ParsedDicomFile(map, encoding_, true /* permissive */));
   }