# HG changeset patch # User Sebastien Jodogne # Date 1547151811 -3600 # Node ID 55dacaf139ed1e512090a60078668e40a0eb6301 # Parent 554832246eaa4131f7c88ceade09b7ec729cd5e0 Don't consider tags whose group is below 0x0008 in C-FIND SCP diff -r 554832246eaa -r 55dacaf139ed Core/DicomNetworking/Internals/FindScp.cpp --- a/Core/DicomNetworking/Internals/FindScp.cpp Thu Jan 10 20:55:28 2019 +0100 +++ b/Core/DicomNetworking/Internals/FindScp.cpp Thu Jan 10 21:23:31 2019 +0100 @@ -166,6 +166,28 @@ } + static void FixFindQuery(DicomMap& target, + const DicomMap& source) + { + // "The definition of a Data Set in PS3.5 specifically excludes + // the range of groups below group 0008, and this includes in + // particular Meta Information Header elements such as Transfer + // Syntax UID (0002,0010)." + // http://dicom.nema.org/medical/dicom/current/output/chtml/part04/sect_C.4.html#sect_C.4.1.1.3 + // https://groups.google.com/d/msg/orthanc-users/D3kpPuX8yV0/_zgHOzkMEQAJ + + DicomArray a(source); + + for (size_t i = 0; i < a.GetSize(); i++) + { + if (a.GetElement(i).GetTag().GetGroup() >= 0x0008) + { + target.SetValue(a.GetElement(i).GetTag(), a.GetElement(i).GetValue()); + } + } + } + + void FindScpCallback( /* in */ @@ -255,7 +277,10 @@ DicomMap input; FromDcmtkBridge::ExtractDicomSummary(input, *requestIdentifiers); - data.findHandler_->Handle(data.answers_, input, sequencesToReturn, + DicomMap filtered; + FixFindQuery(filtered, input); + + data.findHandler_->Handle(data.answers_, filtered, sequencesToReturn, *data.remoteIp_, *data.remoteAet_, *data.calledAet_, modality.GetManufacturer()); ok = true; diff -r 554832246eaa -r 55dacaf139ed NEWS --- a/NEWS Thu Jan 10 20:55:28 2019 +0100 +++ b/NEWS Thu Jan 10 21:23:31 2019 +0100 @@ -4,6 +4,7 @@ Maintenance ----------- +* Don't consider tags whose group is below 0x0008 in C-FIND SCP * Fix issue #118 (Wording in Configuration.json regarding SynchronousCMove) * Fix issue #124 (GET /studies/ID/media fails for certain dicom file) * Fixed Orthanc Explorer on IE and Firefox: Explorer always show "too many results"