# HG changeset patch # User Alain Mazy # Date 1769514391 -3600 # Node ID bd866774d56d6d3d6554eaa7a1eae2c5d0a7c919 # Parent 43ff4470024d7a7c43c3fe915a9d189820d43405 PermissiveStoreSopClasses accepts regex diff -r 43ff4470024d -r bd866774d56d OrthancFramework/Sources/DicomNetworking/RemoteModalityParameters.cpp --- a/OrthancFramework/Sources/DicomNetworking/RemoteModalityParameters.cpp Tue Jan 27 12:15:02 2026 +0100 +++ b/OrthancFramework/Sources/DicomNetworking/RemoteModalityParameters.cpp Tue Jan 27 12:46:31 2026 +0100 @@ -28,8 +28,10 @@ #include "../Logging.h" #include "../OrthancException.h" #include "../SerializationToolbox.h" +#include "../Toolbox.h" #include +#include #include @@ -557,6 +559,23 @@ bool RemoteModalityParameters::IsPermissiveStoreSopClassUid(const std::string& sopClassUid) const { - return permissiveStoreSopClasses_.find(sopClassUid) != permissiveStoreSopClasses_.end(); + for (std::set::const_iterator it = permissiveStoreSopClasses_.begin(); it != permissiveStoreSopClasses_.end(); ++it) + { + if (it->find('*') != std::string::npos || it->find('?') != std::string::npos) + { + boost::regex pattern(Toolbox::WildcardToRegularExpression(*it)); + + if (boost::regex_match(sopClassUid, pattern)) + { + return true; + } + } + else if (sopClassUid == *it) + { + return true; + } + } + + return false; } } diff -r 43ff4470024d -r bd866774d56d OrthancServer/Resources/Configuration.json --- a/OrthancServer/Resources/Configuration.json Tue Jan 27 12:15:02 2026 +0100 +++ b/OrthancServer/Resources/Configuration.json Tue Jan 27 12:46:31 2026 +0100 @@ -516,7 +516,7 @@ * * The "PermissiveStoreSopClasses" option allows one to ignore * errors when a modality does not accept to receive the given - * SOP Classes. + * SOP Classes. Each entry can contain wildcards ("?" or "*"). * E.g. CVI42 does not accept Encapsulated PDF files; by setting * "PermissiveStoreSopClasses": ["1.2.840.10008.5.1.4.1.1.104.1"], * a C-Store to CVI42 will be able to complete even if the study