Mercurial > hg > orthanc
comparison OrthancServer/Search/HierarchicalMatcher.cpp @ 1890:74dc6b764ff0
Fix modality worklists lookups if tags with UN (unknown) VR are present
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 11 Dec 2015 18:39:17 +0100 |
parents | 769178f0ab2c |
children | b465506eb028 |
comparison
equal
deleted
inserted
replaced
1889:444f0bdaba01 | 1890:74dc6b764ff0 |
---|---|
31 | 31 |
32 | 32 |
33 #include "../PrecompiledHeadersServer.h" | 33 #include "../PrecompiledHeadersServer.h" |
34 #include "HierarchicalMatcher.h" | 34 #include "HierarchicalMatcher.h" |
35 | 35 |
36 #include "../../Core/Logging.h" | |
36 #include "../../Core/OrthancException.h" | 37 #include "../../Core/OrthancException.h" |
37 #include "../FromDcmtkBridge.h" | 38 #include "../FromDcmtkBridge.h" |
38 #include "../ToDcmtkBridge.h" | 39 #include "../ToDcmtkBridge.h" |
39 | 40 |
40 #include <dcmtk/dcmdata/dcfilefo.h> | 41 #include <dcmtk/dcmdata/dcfilefo.h> |
123 std::auto_ptr<DicomValue> value(FromDcmtkBridge::ConvertLeafElement | 124 std::auto_ptr<DicomValue> value(FromDcmtkBridge::ConvertLeafElement |
124 (*element, DicomToJsonFlags_None, encoding)); | 125 (*element, DicomToJsonFlags_None, encoding)); |
125 | 126 |
126 if (value->IsBinary()) | 127 if (value->IsBinary()) |
127 { | 128 { |
128 throw OrthancException(ErrorCode_BadRequest); | 129 if (!value->GetContent().empty()) |
130 { | |
131 LOG(WARNING) << "This C-Find modality worklist query contains a non-empty tag (" | |
132 << tag.Format() << ") with UN (unknown) value representation. " | |
133 << "It will be ignored."; | |
134 } | |
135 | |
136 constraints_[tag] = NULL; | |
129 } | 137 } |
130 else if (value->IsNull() || | 138 else if (value->IsNull() || |
131 value->GetContent().empty()) | 139 value->GetContent().empty()) |
132 { | 140 { |
133 // This is an universal matcher | 141 // This is an universal matcher |