# HG changeset patch # User Sebastien Jodogne # Date 1645548388 -3600 # Node ID 45d6ce72a84ef3874f39e136a3e5a98d49d6bc36 # Parent 0acc49da84ab3c216974f5da2dab403f6635deaf fix linking of Sanitizer sample plugin diff -r 0acc49da84ab -r 45d6ce72a84e NEWS --- a/NEWS Mon Feb 21 14:55:12 2022 +0100 +++ b/NEWS Tue Feb 22 17:46:28 2022 +0100 @@ -37,9 +37,10 @@ -------- * API version upgraded to 16 -* If an image can not be decoded, ../preview and ../rendered routes are now returning - unsupported.png only if the ?returnUnsupportedImage option is specified; otherwise, - it raises a 415 error code. +* If an image can not be decoded, ../preview and ../rendered routes + are now returning "unsupported.png" only if the + "?returnUnsupportedImage" option is specified; otherwise, it raises + a 415 HTTP error code. * Archive jobs response now contains a header Content-Disposition:filename='archive.zip' * "/instances/{...}/frames/{...}/numpy": Download the frame as a Python numpy array * "/instances/{...}/numpy": Download the instance as a Python numpy array diff -r 0acc49da84ab -r 45d6ce72a84e OrthancFramework/Resources/CMake/OrthancFrameworkParameters.cmake --- a/OrthancFramework/Resources/CMake/OrthancFrameworkParameters.cmake Mon Feb 21 14:55:12 2022 +0100 +++ b/OrthancFramework/Resources/CMake/OrthancFrameworkParameters.cmake Tue Feb 22 17:46:28 2022 +0100 @@ -94,7 +94,7 @@ set(MSVC_MULTIPLE_PROCESSES OFF CACHE BOOL "Add the /MP option to build with multiple processes if using Visual Studio") set(EMSCRIPTEN_TARGET_MODE "wasm" CACHE STRING "Sets the target mode for Emscripten (can be \"wasm\" or \"asm.js\")") set(EMSCRIPTEN_TRAP_MODE "" CACHE STRING "Sets the trap mode for Emscripten for numeric errors (can notably be empty, or \"clamp\")") -set(OPENSSL_STATIC_VERSION "3.0" CACHE STRING "Version of OpenSSL to be used in static builds (can be \"3.0\")") +set(OPENSSL_STATIC_VERSION "3.0" CACHE STRING "Version of OpenSSL to be used in static builds (can be \"1.1.1\" or \"3.0\")") set(CIVETWEB_OPENSSL_API "1.1" CACHE STRING "Version of the OpenSSL API to be used in civetweb in static builds (can be \"1.0\" or \"1.1\"") set(ORTHANC_LUA_VERSION "" CACHE STRING "Force the version of Lua to be used by Orthanc (for instance \"5.3\"), if empty, this will be autodetected") diff -r 0acc49da84ab -r 45d6ce72a84e OrthancFramework/Sources/DicomNetworking/Internals/CommandDispatcher.cpp --- a/OrthancFramework/Sources/DicomNetworking/Internals/CommandDispatcher.cpp Mon Feb 21 14:55:12 2022 +0100 +++ b/OrthancFramework/Sources/DicomNetworking/Internals/CommandDispatcher.cpp Tue Feb 22 17:46:28 2022 +0100 @@ -788,18 +788,20 @@ break; case DIMSE_C_FIND_RQ: + { + std::string sopClassUid(msg.msg.CFindRQ.AffectedSOPClassUID); + if (sopClassUid == UID_FINDModalityWorklistInformationModel) { - std::string sopClassUid(msg.msg.CFindRQ.AffectedSOPClassUID); - if (sopClassUid == UID_FINDModalityWorklistInformationModel) - { - request = DicomRequestType_FindWorklist; - } - else - { - request = DicomRequestType_Find; - } - supported = true; - }; break; + request = DicomRequestType_FindWorklist; + } + else + { + request = DicomRequestType_Find; + } + supported = true; + break; + } + case DIMSE_N_ACTION_RQ: request = DicomRequestType_NAction; supported = true; diff -r 0acc49da84ab -r 45d6ce72a84e OrthancFramework/Sources/DicomParsing/ParsedDicomFile.cpp --- a/OrthancFramework/Sources/DicomParsing/ParsedDicomFile.cpp Mon Feb 21 14:55:12 2022 +0100 +++ b/OrthancFramework/Sources/DicomParsing/ParsedDicomFile.cpp Tue Feb 22 17:46:28 2022 +0100 @@ -1259,10 +1259,8 @@ } case MimeType_Binary: - { EmbedRawPixelData(content); break; - } default: throw OrthancException(ErrorCode_NotImplemented); diff -r 0acc49da84ab -r 45d6ce72a84e OrthancFramework/Sources/Enumerations.cpp --- a/OrthancFramework/Sources/Enumerations.cpp Mon Feb 21 14:55:12 2022 +0100 +++ b/OrthancFramework/Sources/Enumerations.cpp Tue Feb 22 17:46:28 2022 +0100 @@ -839,7 +839,7 @@ break; case DicomRequestType_FindWorklist: - return "Find Worklist"; + return "FindWorklist"; break; case DicomRequestType_Get: diff -r 0acc49da84ab -r 45d6ce72a84e OrthancFramework/Sources/FileStorage/StorageAccessor.cpp --- a/OrthancFramework/Sources/FileStorage/StorageAccessor.cpp Mon Feb 21 14:55:12 2022 +0100 +++ b/OrthancFramework/Sources/FileStorage/StorageAccessor.cpp Tue Feb 22 17:46:28 2022 +0100 @@ -239,11 +239,7 @@ FileContentType contentType, uint64_t end /* exclusive */) { - if (cache_.FetchStartRange(target, fileUuid, contentType, end)) - { - return; - } - else + if (!cache_.FetchStartRange(target, fileUuid, contentType, end)) { MetricsTimer timer(*this, METRICS_READ); std::unique_ptr buffer(area_.ReadRange(fileUuid, contentType, 0, end)); diff -r 0acc49da84ab -r 45d6ce72a84e OrthancServer/Plugins/Engine/OrthancPlugins.cpp --- a/OrthancServer/Plugins/Engine/OrthancPlugins.cpp Mon Feb 21 14:55:12 2022 +0100 +++ b/OrthancServer/Plugins/Engine/OrthancPlugins.cpp Tue Feb 22 17:46:28 2022 +0100 @@ -70,7 +70,7 @@ #include #include -#define ERROR_MESSAGE_64BIT "A 64bit version of the Orthanc SDK is necessary to use buffers > 4GB and it is currently not available !" +#define ERROR_MESSAGE_64BIT "A 64bit version of the Orthanc SDK is necessary to use buffers > 4GB, but is currently not available" namespace Orthanc @@ -2324,7 +2324,7 @@ } return true; } - else if (callbackResult == OrthancPluginReceivedInstanceCallbackResult_Modified) + else if (callbackResult == OrthancPluginReceivedInstanceCallbackResult_Modify) { if (modifiedDicomSize64 > 0 && modifiedDicomBufferData != NULL) { diff -r 0acc49da84ab -r 45d6ce72a84e OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h --- a/OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h Mon Feb 21 14:55:12 2022 +0100 +++ b/OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h Tue Feb 22 17:46:28 2022 +0100 @@ -1008,9 +1008,9 @@ **/ typedef enum { - OrthancPluginReceivedInstanceCallbackResult_KeepAsIs = 1, /*!< Keep the instance as is */ - OrthancPluginReceivedInstanceCallbackResult_Modified = 2, /*!< Modified the instance */ - OrthancPluginReceivedInstanceCallbackResult_Discard = 3, /*!< Tell Orthanc to discard the instance */ + OrthancPluginReceivedInstanceCallbackResult_KeepAsIs = 1, /*!< Keep the instance as is */ + OrthancPluginReceivedInstanceCallbackResult_Modify = 2, /*!< Modify the instance */ + OrthancPluginReceivedInstanceCallbackResult_Discard = 3, /*!< Tell Orthanc to discard the instance */ _OrthancPluginReceivedInstanceCallbackResult_INTERNAL = 0x7fffffff } OrthancPluginReceivedInstanceCallbackResult; diff -r 0acc49da84ab -r 45d6ce72a84e OrthancServer/Plugins/Samples/Sanitizer/CMakeLists.txt --- a/OrthancServer/Plugins/Samples/Sanitizer/CMakeLists.txt Mon Feb 21 14:55:12 2022 +0100 +++ b/OrthancServer/Plugins/Samples/Sanitizer/CMakeLists.txt Tue Feb 22 17:46:28 2022 +0100 @@ -51,6 +51,8 @@ ${ORTHANC_DICOM_SOURCES} ) +target_link_libraries(Sanitizer ${DCMTK_LIBRARIES}) + install( TARGETS Sanitizer diff -r 0acc49da84ab -r 45d6ce72a84e OrthancServer/Plugins/Samples/Sanitizer/Plugin.cpp --- a/OrthancServer/Plugins/Samples/Sanitizer/Plugin.cpp Mon Feb 21 14:55:12 2022 +0100 +++ b/OrthancServer/Plugins/Samples/Sanitizer/Plugin.cpp Tue Feb 22 17:46:28 2022 +0100 @@ -50,7 +50,7 @@ *modifiedDicomBufferSize = modifiedDicom.size(); memcpy(*modifiedDicomBuffer, modifiedDicom.c_str(), modifiedDicom.size()); - return OrthancPluginReceivedInstanceCallbackResult_Modified; + return OrthancPluginReceivedInstanceCallbackResult_Modify; } diff -r 0acc49da84ab -r 45d6ce72a84e OrthancServer/Resources/Configuration.json --- a/OrthancServer/Resources/Configuration.json Mon Feb 21 14:55:12 2022 +0100 +++ b/OrthancServer/Resources/Configuration.json Tue Feb 22 17:46:28 2022 +0100 @@ -289,9 +289,9 @@ // from SCU modalities it does not know about (i.e. that are not // listed in the "DicomModalities" option above). Setting this // option to "true" implies security risks. (new in Orthanc 1.9.0) - // Note: from version 1.10.0, this option applies to C-FIND requests - // for Patients/Studies/Series/Instances. Another option is available - // for Worklists (see below) + // Note: From Orthanc 1.10.0, this option only applies to C-FIND + // requests for patients/studies/series/instances. Use option + // "DicomAlwaysAllowFindWorklist" for worklists. "DicomAlwaysAllowFind" : false, // Whether the Orthanc SCP allows incoming C-FIND requests for worklists, @@ -437,11 +437,11 @@ // Number of threads that are used by the embedded DICOM server. // This defines the number of concurrent DICOM operations that can - // be run. Note: this is not limiting the number of concurrent - // connections. With a single thread, if a C-Find is received - // during e.g the transcoding of an incoming C-Store, it will - // have to wait until the end of the C-Store before being processed. - // (new in Orthanc 1.10.0, before this version, the value was fixed to 4) + // be run. Note: This is not limiting the number of concurrent + // connections. With a single thread, if a C-Find is received during + // e.g the transcoding of an incoming C-Store, it will have to wait + // until the end of the C-Store before being processed. (new in + // Orthanc 1.10.0, before this version, the value was fixed to 4) "DicomThreadsCount" : 4, // The list of the known Orthanc peers. This option is ignored if @@ -649,7 +649,7 @@ // multiplicity (> 0 with defaults to 1), possibly the maximum // multiplicity (0 means arbitrary multiplicity, defaults to 1), and // possibly the Private Creator (for private tags). - // Note: for private tags, you should only declare the lower 8 bits + // Note: For private tags, you should only declare the lower 8 bits // of the element since the higher 8 bits may vary from one file to // the other. "Dictionary" : { diff -r 0acc49da84ab -r 45d6ce72a84e TODO --- a/TODO Mon Feb 21 14:55:12 2022 +0100 +++ b/TODO Tue Feb 22 17:46:28 2022 +0100 @@ -137,9 +137,9 @@ useful in ServerContext::DecodeDicomInstance() * DicomMap: create a cache to the main DICOM tags index * Check out rapidjson: https://github.com/miloyip/nativejson-benchmark -* optimize tools/find with ModalitiesInStudies: +* Optimize tools/find with ModalitiesInStudies: https://groups.google.com/g/orthanc-users/c/aN8nqcRd3jw/m/pmc9ylVeAwAJ. - One solution could be: filter first without ModalitiesInStudies and then + One solution could be: Filter first without ModalitiesInStudies and then cycle through the responses to filter out with ModalitiesInStudies ======== @@ -169,7 +169,7 @@ https://groups.google.com/d/msg/orthanc-users/BtvLTE5Ni8A/vIMhmMgfBAAJ * In "OrthancPluginLog[Error|Warning|Info]()", prefix the log line with the name of the plugin, as retrieved by "OrthancPluginGetName()" -* update the SDK to handle buffer sizes > 4GB (all sizes are currently coded in uint32_t) +* Update the SDK to handle buffer sizes > 4GB (all sizes are currently coded in uint32_t) ---------------- Ideas of plugins