Mercurial > hg > orthanc
changeset 6604:558f2d043e79
removed PermissiveStoreSopClasses option since this can be implemented with the new lua callback OutgoingCStoreInstanceFilter that enables more complex scenario
| author | Alain Mazy <am@orthanc.team> |
|---|---|
| date | Tue, 24 Feb 2026 15:12:12 +0100 |
| parents | c00a24b2cada |
| children | 6e17d039332d |
| files | NEWS OrthancFramework/Sources/DicomNetworking/DicomStoreUserConnection.cpp OrthancFramework/Sources/DicomNetworking/RemoteModalityParameters.cpp OrthancFramework/Sources/DicomNetworking/RemoteModalityParameters.h OrthancServer/Resources/Configuration.json |
| diffstat | 5 files changed, 4 insertions(+), 57 deletions(-) [+] |
line wrap: on
line diff
--- a/NEWS Mon Feb 23 17:33:25 2026 +0100 +++ b/NEWS Tue Feb 24 15:12:12 2026 +0100 @@ -4,8 +4,6 @@ General ------- -* New configuration "PermissiveStoreSopClasses" in "DicomModalities" to ignore errors if - a modality does not accept receiving the given SOP Classes. REST API -------- @@ -24,7 +22,7 @@ Lua --- -* Added a new "OutgoingCStoreInstanceFilter()" function. (TODO: document in the book + implement in plugins SDK + Remove PermissiveStoreSopClasses ?) +* Added a new "OutgoingCStoreInstanceFilter()" function. (TODO: document in the book + implement in plugins SDK) Plugins -------
--- a/OrthancFramework/Sources/DicomNetworking/DicomStoreUserConnection.cpp Mon Feb 23 17:33:25 2026 +0100 +++ b/OrthancFramework/Sources/DicomNetworking/DicomStoreUserConnection.cpp Tue Feb 24 15:12:12 2026 +0100 @@ -547,16 +547,8 @@ if (accepted.size() == 0) { - if (parameters_.GetRemoteModality().IsPermissiveStoreSopClassUid(sopClassUid)) - { - LOG(INFO) << "Permissive SopClassUid '" << sopClassUid << "' is not accepted by '" << parameters_.GetRemoteModality().GetApplicationEntityTitle() << "'"; - return; - } - else - { - throw OrthancException(ErrorCode_NoPresentationContext, "Cannot C-Store an instance of SOPClassUID " + - sopClassUid + ", the destination has not accepted any TransferSyntax for this SOPClassUID."); - } + throw OrthancException(ErrorCode_NoPresentationContext, "Cannot C-Store an instance of SOPClassUID " + + sopClassUid + ", the destination has not accepted any TransferSyntax for this SOPClassUID."); } if (accepted.find(sourceSyntax) != accepted.end())
--- a/OrthancFramework/Sources/DicomNetworking/RemoteModalityParameters.cpp Mon Feb 23 17:33:25 2026 +0100 +++ b/OrthancFramework/Sources/DicomNetworking/RemoteModalityParameters.cpp Tue Feb 24 15:12:12 2026 +0100 @@ -53,7 +53,6 @@ static const char* KEY_LOCAL_AET = "LocalAet"; static const char* KEY_TIMEOUT = "Timeout"; static const char* KEY_RETRIEVE_METHOD = "RetrieveMethod"; -static const char* KEY_PERMISSIVE_STORE_SOP_CLASSES = "PermissiveStoreSopClasses"; namespace Orthanc @@ -77,7 +76,6 @@ localAet_.clear(); timeout_ = 0; retrieveMethod_ = RetrieveMethod_SystemDefault; - permissiveStoreSopClasses_.clear(); } @@ -325,11 +323,6 @@ retrieveMethod_ = RetrieveMethod_SystemDefault; } - if (serialized.isMember(KEY_PERMISSIVE_STORE_SOP_CLASSES)) - { - SerializationToolbox::ReadSetOfStrings(permissiveStoreSopClasses_, serialized[KEY_PERMISSIVE_STORE_SOP_CLASSES]); - } - } @@ -422,7 +415,6 @@ !allowNEventReport_ || !allowTranscoding_ || useDicomTls_ || - permissiveStoreSopClasses_.size() > 0 || HasLocalAet()); } @@ -451,7 +443,6 @@ target[KEY_LOCAL_AET] = localAet_; target[KEY_TIMEOUT] = timeout_; target[KEY_RETRIEVE_METHOD] = EnumerationToString(retrieveMethod_); - SerializationToolbox::WriteSetOfStrings(target, permissiveStoreSopClasses_, KEY_PERMISSIVE_STORE_SOP_CLASSES); } else { @@ -557,25 +548,4 @@ retrieveMethod_ = retrieveMethod; } - bool RemoteModalityParameters::IsPermissiveStoreSopClassUid(const std::string& sopClassUid) const - { - for (std::set<std::string>::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; - } }
--- a/OrthancFramework/Sources/DicomNetworking/RemoteModalityParameters.h Mon Feb 23 17:33:25 2026 +0100 +++ b/OrthancFramework/Sources/DicomNetworking/RemoteModalityParameters.h Tue Feb 24 15:12:12 2026 +0100 @@ -28,7 +28,6 @@ #include <stdint.h> #include <string> -#include <set> #include <json/value.h> namespace Orthanc @@ -53,7 +52,6 @@ std::string localAet_; uint32_t timeout_; RetrieveMethod retrieveMethod_; // New in Orthanc 1.12.6 - std::set<std::string> permissiveStoreSopClasses_; // New in 1.12.11: a list of sop classes that will not generate an error if they are not accepted by the remote modality void Clear(); @@ -125,7 +123,5 @@ RetrieveMethod GetRetrieveMethod() const; void SetRetrieveMethod(RetrieveMethod retrieveMethod); - - bool IsPermissiveStoreSopClassUid(const std::string& sopClassUid) const; }; }
--- a/OrthancServer/Resources/Configuration.json Mon Feb 23 17:33:25 2026 +0100 +++ b/OrthancServer/Resources/Configuration.json Tue Feb 24 15:12:12 2026 +0100 @@ -513,14 +513,6 @@ * The "RetrieveMethod" option allows one to overwrite the global * "DicomDefaultRetrieveMethod" configuration option for this * specific modality. (Allowed values: "C-MOVE" or "C-GET"). - * - * The "PermissiveStoreSopClasses" option allows one to ignore - * errors when a modality does not accept to receive the given - * 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 - * contains an encapsulated PDF. **/ //"untrusted" : { // "AET" : "ORTHANC", @@ -538,8 +530,7 @@ // "UseDicomTls" : false, // new in 1.9.0 // "LocalAet" : "HELLO", // new in 1.9.0 // "Timeout" : 60, // new in 1.9.1 - // "RetrieveMethod": "C-MOVE", // new in 1.12.6 - // "PermissiveStoreSopClasses": [] // new in 1.12.11 + // "RetrieveMethod": "C-MOVE" // new in 1.12.6 //} },
