# HG changeset patch # User Sebastien Jodogne # Date 1648057747 -3600 # Node ID 0a255ec7a5e97e405f10e4b798f2e05be606b1ca # Parent fa14f508d2443f03517d162a8ef71def9e7d676a Upgrade to GDCM 3.0.10 for static builds diff -r fa14f508d244 -r 0a255ec7a5e9 NEWS --- a/NEWS Wed Mar 23 18:20:13 2022 +0100 +++ b/NEWS Wed Mar 23 18:49:07 2022 +0100 @@ -1,8 +1,9 @@ Pending changes in the mainline =============================== -* Take the configuration "RestrictTransferSyntaxes" into account not - only for Decoding but also for Transcoding. +* Take the configuration option "RestrictTransferSyntaxes" into + account not only for decoding, but also for transcoding +* Upgrade to GDCM 3.0.10 for static builds Version 1.4 (2021-07-06) ======================== diff -r fa14f508d244 -r 0a255ec7a5e9 Plugin/Plugin.cpp --- a/Plugin/Plugin.cpp Wed Mar 23 18:20:13 2022 +0100 +++ b/Plugin/Plugin.cpp Wed Mar 23 18:49:07 2022 +0100 @@ -30,12 +30,19 @@ #include #include #include +#include #include #include #include #include #include -#include + +#define GDCM_VERSION_IS_ABOVE(major, minor, revision) \ + (GDCM_MAJOR_VERSION > major || \ + (GDCM_MAJOR_VERSION == major && \ + (GDCM_MINOR_VERSION > minor || \ + (GDCM_MINOR_VERSION == minor && \ + GDCM_BUILD_VERSION >= revision)))) static OrthancPlugins::GdcmDecoderCache cache_; @@ -378,19 +385,21 @@ // https://groups.google.com/g/orthanc-users/c/xIwrkFRceuE/m/jwxy50djAQAJ throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, "Cannot transcode 1bpp DICOM images"); } - + +#if !GDCM_VERSION_IS_ABOVE(3, 0, 9) if (reader.GetImage().GetPixelFormat().GetBitsStored() == 16u && syntax == gdcm::TransferSyntax::JPEGExtendedProcess2_4) { /** * This is a temporary workaround for issue #513 in GDCM - * (will be fixed in GDCM 3.0.9): + * that was fixed in GDCM 3.0.9: * https://sourceforge.net/p/gdcm/bugs/513/ * https://groups.google.com/g/orthanc-users/c/xt9hwpj6mlQ **/ throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, "Transcoding 16bpp images to 1.2.840.10008.1.2.4.51 might lead to a crash in GDCM"); } +#endif gdcm::ImageChangeTransferSyntax change; change.SetTransferSyntax(syntax); diff -r fa14f508d244 -r 0a255ec7a5e9 Resources/CMake/GdcmConfiguration.cmake --- a/Resources/CMake/GdcmConfiguration.cmake Wed Mar 23 18:20:13 2022 +0100 +++ b/Resources/CMake/GdcmConfiguration.cmake Wed Mar 23 18:49:07 2022 +0100 @@ -22,8 +22,8 @@ set(GDCM_URL "http://orthanc.osimis.io/ThirdPartyDownloads/gdcm-2.8.9.tar.gz") set(GDCM_MD5 "aeb00e0cb5375d454010a72e2e0f6154") else() - set(GDCM_URL "http://orthanc.osimis.io/ThirdPartyDownloads/gdcm-3.0.8.tar.gz") - set(GDCM_MD5 "29e0e60b04183e3eb9c18ad093156b2c") + set(GDCM_URL "http://orthanc.osimis.io/ThirdPartyDownloads/gdcm-3.0.10.tar.gz") + set(GDCM_MD5 "28c70d02c2005a8c9d2a5847c8ba3c00") endif() if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR