Mercurial > hg > orthanc
diff OrthancServer/Sources/OrthancFindRequestHandler.cpp @ 5699:e8e028aed89f find-refactoring
c-find tests pass using ResourceFinder
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 12 Jul 2024 14:08:31 +0200 |
parents | 075558c95cbb |
children | 1fab9ddaf702 |
line wrap: on
line diff
--- a/OrthancServer/Sources/OrthancFindRequestHandler.cpp Fri Jul 12 12:48:37 2024 +0200 +++ b/OrthancServer/Sources/OrthancFindRequestHandler.cpp Fri Jul 12 14:08:31 2024 +0200 @@ -537,7 +537,6 @@ throw OrthancException(ErrorCode_NotImplemented); } - DicomArray query(*filteredInput); CLOG(INFO, DICOM) << "DICOM C-Find request at level: " << EnumerationToString(level); @@ -585,14 +584,21 @@ const DicomTag tag = element.GetTag(); // remove tags that are not used for matching - if (element.GetValue().IsNull() || - tag == DICOM_TAG_QUERY_RETRIEVE_LEVEL || + if (tag == DICOM_TAG_QUERY_RETRIEVE_LEVEL || tag == DICOM_TAG_SPECIFIC_CHARACTER_SET || tag == DICOM_TAG_TIMEZONE_OFFSET_FROM_UTC) // time zone is not directly used for matching. Once we support "Timezone query adjustment", we may use it to adjust date-time filters but for now, just ignore it { continue; } + requestedTags.insert(tag); + + if (element.GetValue().IsNull()) + { + // There is no constraint on this tag + continue; + } + std::string value = element.GetValue().GetContent(); if (value.size() == 0) { @@ -617,7 +623,6 @@ } else { - requestedTags.insert(tag); CLOG(INFO, DICOM) << "Because of a patch for the manufacturer of the remote modality, " << "ignoring constraint on tag (" << tag.Format() << ") " << FromDcmtkBridge::GetTagName(element); @@ -632,7 +637,7 @@ size_t limit = (level == ResourceType_Instance) ? maxInstances_ : maxResults_; - if (false) + if (true) { /** * EXPERIMENTAL VERSION