Mercurial > hg > orthanc
changeset 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 | 444f0bdaba01 |
children | b465506eb028 |
files | NEWS OrthancServer/Search/HierarchicalMatcher.cpp Plugins/Samples/ModalityWorklists/Plugin.cpp |
diffstat | 3 files changed, 15 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/NEWS Fri Dec 11 16:42:26 2015 +0100 +++ b/NEWS Fri Dec 11 18:39:17 2015 +0100 @@ -5,6 +5,7 @@ * Fix of DICOMDIR generation with DCMTK 3.6.1, support of encodings * New function in plugin SDK: "OrthancPluginSendMultipartItem2()" * Fix range search if the lower or upper limit is absent +* Fix modality worklists lookups if tags with UN (unknown) VR are present Version 0.9.6 (2015/12/08)
--- a/OrthancServer/Search/HierarchicalMatcher.cpp Fri Dec 11 16:42:26 2015 +0100 +++ b/OrthancServer/Search/HierarchicalMatcher.cpp Fri Dec 11 18:39:17 2015 +0100 @@ -33,6 +33,7 @@ #include "../PrecompiledHeadersServer.h" #include "HierarchicalMatcher.h" +#include "../../Core/Logging.h" #include "../../Core/OrthancException.h" #include "../FromDcmtkBridge.h" #include "../ToDcmtkBridge.h" @@ -125,7 +126,14 @@ if (value->IsBinary()) { - throw OrthancException(ErrorCode_BadRequest); + if (!value->GetContent().empty()) + { + LOG(WARNING) << "This C-Find modality worklist query contains a non-empty tag (" + << tag.Format() << ") with UN (unknown) value representation. " + << "It will be ignored."; + } + + constraints_[tag] = NULL; } else if (value->IsNull() || value->GetContent().empty())
--- a/Plugins/Samples/ModalityWorklists/Plugin.cpp Fri Dec 11 16:42:26 2015 +0100 +++ b/Plugins/Samples/ModalityWorklists/Plugin.cpp Fri Dec 11 18:39:17 2015 +0100 @@ -131,8 +131,11 @@ return OrthancPluginErrorCode_InternalError; } - std::cout << "Received worklist query from remote modality " << remoteAet - << ":" << std::endl << json.toStyledString(); + { + std::string msg = ("Received worklist query from remote modality " + + std::string(remoteAet) + ":\n" + json.toStyledString()); + OrthancPluginLogInfo(context_, msg.c_str()); + } boost::filesystem::path source(folder_); boost::filesystem::directory_iterator end;