# HG changeset patch # User Sebastien Jodogne # Date 1780675546 -7200 # Node ID 987befd8303d872fb8d058d90fd8178f7a33f076 # Parent a5ded5f913ed4cbb4f8e690a714f96aa83f187dd fix build against old versions of DCMTK diff -r a5ded5f913ed -r 987befd8303d OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.cpp --- a/OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.cpp Fri Jun 05 17:58:48 2026 +0200 +++ b/OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.cpp Fri Jun 05 18:05:46 2026 +0200 @@ -2020,22 +2020,18 @@ case EVR_OB: return ValueRepresentation_OtherByte; +#if DCMTK_VERSION_NUMBER >= 361 case EVR_OD: -#if DCMTK_VERSION_NUMBER >= 361 return ValueRepresentation_OtherDouble; -#else - throw OrthancException(ErrorCode_NotSupported, "OD value representation is not supported, as using DCMTK <= 3.6.0"); #endif case EVR_OF: return ValueRepresentation_OtherFloat; +#if DCMTK_VERSION_NUMBER >= 362 case EVR_OL: -#if DCMTK_VERSION_NUMBER >= 362 + // Even though EVR_OL was introduced in DCMTK 3.6.1, its implementation was broken return ValueRepresentation_OtherLong; -#else - // Even though EVR_OL was introduced in DCMTK 3.6.1, its implementation was broken - throw OrthancException(ErrorCode_NotSupported, "OL value representation is not supported, as using DCMTK <= 3.6.1"); #endif case EVR_OW: @@ -2062,11 +2058,9 @@ case EVR_TM: return ValueRepresentation_Time; +#if DCMTK_VERSION_NUMBER >= 361 case EVR_UC: -#if DCMTK_VERSION_NUMBER >= 361 return ValueRepresentation_UnlimitedCharacters; -#else - throw OrthancException(ErrorCode_NotSupported, "UC value representation is not supported, as using DCMTK <= 3.6.0"); #endif case EVR_UI: @@ -2078,11 +2072,9 @@ case EVR_UN: return ValueRepresentation_Unknown; +#if DCMTK_VERSION_NUMBER >= 361 case EVR_UR: -#if DCMTK_VERSION_NUMBER >= 361 return ValueRepresentation_UniversalResource; -#else - throw OrthancException(ErrorCode_NotSupported, "UR value representation is not supported, as using DCMTK <= 3.6.0"); #endif case EVR_US: @@ -2091,28 +2083,23 @@ case EVR_UT: return ValueRepresentation_UnlimitedText; +#if DCMTK_VERSION_NUMBER >= 365 case EVR_OV: -#if DCMTK_VERSION_NUMBER >= 365 return ValueRepresentation_OtherVeryLong; -#else - throw OrthancException(ErrorCode_NotSupported, "OV value representation is not supported, as using DCMTK <= 3.6.4"); #endif +#if DCMTK_VERSION_NUMBER >= 365 case EVR_SV: -#if DCMTK_VERSION_NUMBER >= 365 return ValueRepresentation_SignedVeryLong; -#else - throw OrthancException(ErrorCode_NotSupported, "SV value representation is not supported, as using DCMTK <= 3.6.4"); #endif +#if DCMTK_VERSION_NUMBER >= 365 case EVR_UV: -#if DCMTK_VERSION_NUMBER >= 365 return ValueRepresentation_UnsignedVeryLong; -#else - throw OrthancException(ErrorCode_NotSupported, "UV value representation is not supported, as using DCMTK <= 3.6.4"); #endif default: + // This notably happens if the version of DCMTK is too old return ValueRepresentation_NotSupported; } }