Mercurial > hg > orthanc
changeset 6974:58018d5883d1
C-Find SCP: don't try to match on PrivateCreator tags
| author | Alain Mazy <am@orthanc.team> |
|---|---|
| date | Thu, 02 Jul 2026 16:34:16 +0200 |
| parents | 534f52a5dba0 |
| children | 0e6a65731bbc |
| files | NEWS OrthancFramework/Sources/DicomFormat/DicomTag.cpp OrthancFramework/Sources/DicomFormat/DicomTag.h OrthancServer/Sources/OrthancFindRequestHandler.cpp OrthancServer/Sources/ResourceFinder.cpp |
| diffstat | 5 files changed, 18 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/NEWS Wed Jul 01 17:21:37 2026 +0200 +++ b/NEWS Thu Jul 02 16:34:16 2026 +0200 @@ -19,10 +19,13 @@ - StoreKeyValue(storeId, key, value) - value = GetKeyValue(storeId, key) - DeleteKeyValue(storeId, key) -* C-Find SCP: When Orthanc was requested a sequence in a C-Find, Orthanc was actually not returning - any sequences in the C-Find answer if the matched resource did contain the requested sequence and - was returning an empty sequence if the matched resource did not contain the requested sequence. - Orthanc now returns the full sequence content when the matched resource contains the requested sequence. +* C-Find SCP: + - When Orthanc was requested a sequence in a C-Find query, Orthanc was actually not returning + any sequences in the C-Find answer if the matched resource did contain the requested sequence and + was returning an empty sequence if the matched resource did not contain the requested sequence. + Orthanc now returns the full sequence content when the matched resource contains the requested sequence. + - When Orthanc was requested to return a private tag in a C-Find query, Orthanc was actually not returning + the resources that did not contain the private tag although it was not used as a filter in the query. REST API
--- a/OrthancFramework/Sources/DicomFormat/DicomTag.cpp Wed Jul 01 17:21:37 2026 +0200 +++ b/OrthancFramework/Sources/DicomFormat/DicomTag.cpp Thu Jul 02 16:34:16 2026 +0200 @@ -77,6 +77,10 @@ return group_ % 2 == 1; } + bool DicomTag::IsPrivateCreator() const + { + return IsPrivate() && (element_ >= 0x0010 && element_ <= 0x00FF); + } bool DicomTag::operator< (const DicomTag& other) const {
--- a/OrthancFramework/Sources/DicomFormat/DicomTag.h Wed Jul 01 17:21:37 2026 +0200 +++ b/OrthancFramework/Sources/DicomFormat/DicomTag.h Thu Jul 02 16:34:16 2026 +0200 @@ -51,6 +51,8 @@ bool IsPrivate() const; + bool IsPrivateCreator() const; + bool operator< (const DicomTag& other) const; bool operator<= (const DicomTag& other) const;
--- a/OrthancServer/Sources/OrthancFindRequestHandler.cpp Wed Jul 01 17:21:37 2026 +0200 +++ b/OrthancServer/Sources/OrthancFindRequestHandler.cpp Thu Jul 02 16:34:16 2026 +0200 @@ -408,6 +408,11 @@ continue; } + if (tag.IsPrivateCreator()) // new in 1.12.11+: don't try to match PrivateCreators themselves (they are not mandatory); match only the private tags + { + continue; + } + if (FilterQueryTag(level, tag, connection.GetModalityManufacturer())) { ValueRepresentation vr = FromDcmtkBridge::LookupValueRepresentation(tag);
--- a/OrthancServer/Sources/ResourceFinder.cpp Wed Jul 01 17:21:37 2026 +0200 +++ b/OrthancServer/Sources/ResourceFinder.cpp Thu Jul 02 16:34:16 2026 +0200 @@ -980,8 +980,6 @@ } else { - // TODO-FIND: This fallback shouldn't be necessary - FindRequest requestDicomAttachment(request.GetLevel()); requestDicomAttachment.SetOrthancId(request.GetLevel(), resource.GetIdentifier());
