# HG changeset patch # User Sebastien Jodogne # Date 1466515069 -7200 # Node ID e33e0ae51d7b104de28c56df1bc2ee4b46873117 # Parent 235319b3ddf0cb89b47647aa3ba15050b17821d8 new configuration option AllowFindSopClassesInStudy diff -r 235319b3ddf0 -r e33e0ae51d7b NEWS --- a/NEWS Tue Jun 21 14:29:45 2016 +0200 +++ b/NEWS Tue Jun 21 15:17:49 2016 +0200 @@ -6,7 +6,7 @@ * HTTPS client certificates can be associated with Orthanc peers to enhance security over Internet * Possibility to use PKCS#11 authentication for hardware security modules with Orthanc peers -* New option "--logfile" to output the Orthanc log to the given file +* New command-line option "--logfile" to output the Orthanc log to the given file * Support of SIGHUP signal (restart Orthanc only if the configuration files have changed) REST API @@ -61,6 +61,7 @@ * Upgrade to Boost 1.60.0 for static builds * Use of HTTP status 403 Forbidden (instead of 401) if access to a REST resource is disallowed * Option "HttpsVerifyPeers" can be used to connect against self-signed HTTPS certificates +* New configuration option "AllowFindSopClassesInStudy" * Macro "__linux" (now obsolete) replaced by macro "__linux__" (maybe solves Debian bug #821011) * Modification of instances can now replace PixelData (resp. EncapsulatedDocument) with provided a PNG/JPEG image (resp. PDF file) if it is encoded using Data URI Scheme diff -r 235319b3ddf0 -r e33e0ae51d7b OrthancServer/OrthancFindRequestHandler.cpp --- a/OrthancServer/OrthancFindRequestHandler.cpp Tue Jun 21 14:29:45 2016 +0200 +++ b/OrthancServer/OrthancFindRequestHandler.cpp Tue Jun 21 15:17:49 2016 +0200 @@ -112,6 +112,9 @@ const DicomTag& tag, const std::list& instances) { + // WARNING: This function is slow, as it reads the JSON file + // summarizing each instance of interest from the hard drive. + std::string formatted = tag.Format(); for (std::list::const_iterator @@ -223,9 +226,18 @@ if (query.HasTag(DICOM_TAG_SOP_CLASSES_IN_STUDY)) { - std::set values; - ExtractTagFromInstances(values, context, DICOM_TAG_SOP_CLASS_UID, instances); - StoreSetOfStrings(result, DICOM_TAG_SOP_CLASSES_IN_STUDY, values); + if (Configuration::GetGlobalBoolParameter("AllowFindSopClassesInStudy", false)) + { + std::set values; + ExtractTagFromInstances(values, context, DICOM_TAG_SOP_CLASS_UID, instances); + StoreSetOfStrings(result, DICOM_TAG_SOP_CLASSES_IN_STUDY, values); + } + else + { + result.SetValue(DICOM_TAG_SOP_CLASSES_IN_STUDY, "", false); + LOG(WARNING) << "The handling of \"SOP Classes in Study\" (0008,0062) " + << "in C-FIND requests is disabled"; + } } } diff -r 235319b3ddf0 -r e33e0ae51d7b Resources/Configuration.json --- a/Resources/Configuration.json Tue Jun 21 14:29:45 2016 +0200 +++ b/Resources/Configuration.json Tue Jun 21 15:17:49 2016 +0200 @@ -302,6 +302,11 @@ } **/ + // If set to "true", Orthanc will handle "SOP Classes in Study" + // (0008,0062) in C-FIND requests. This option is turned off by + // default, as it requires intensive accesses to the hard drive. + "AllowFindSopClassesInStudy" : false, + // Register a new tag in the dictionary of DICOM tags that are known // to Orthanc. Each line must contain the tag (formatted as 2 // hexadecimal numbers), the value representation (2 upcase