Mercurial > hg > orthanc
changeset 6933:715d89b30809
added internal support for OV, SV, and UV value representations
| author | Sebastien Jodogne <s.jodogne@gmail.com> |
|---|---|
| date | Fri, 05 Jun 2026 17:46:10 +0200 |
| parents | 5e9dfa326055 |
| children | a5ded5f913ed |
| files | NEWS OrthancFramework/Sources/DicomFormat/DicomMap.cpp OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.cpp OrthancFramework/Sources/DicomParsing/ToDcmtkBridge.cpp OrthancFramework/Sources/Enumerations.cpp OrthancFramework/Sources/Enumerations.h OrthancServer/Plugins/Engine/PluginsEnumerations.cpp OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h |
| diffstat | 8 files changed, 117 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/NEWS Fri Jun 05 17:25:30 2026 +0200 +++ b/NEWS Fri Jun 05 17:46:10 2026 +0200 @@ -39,11 +39,12 @@ * Added OrthancPluginClearCurrentThreadName() to avoid storing many thread names when dynamically creating/killing threads in a plugin. -* Added OD, OL, UC, and UR values to the OrthancPluginValueRepresentation enumeration +* Added OD, OL, UC, UR, OV, SV, and UV values to the OrthancPluginValueRepresentation enumeration Maintenance ----------- +* Added internal support for OV, SV, and UV value representations * Fix resubmit/pause/cancel and reloading of OrthancPeerStore and DicomModalityStore jobs (bug introduced in 1.12.10) * Fix OrthancPeerStore jobs that was using the loader threads only if transcoding
--- a/OrthancFramework/Sources/DicomFormat/DicomMap.cpp Fri Jun 05 17:25:30 2026 +0200 +++ b/OrthancFramework/Sources/DicomFormat/DicomMap.cpp Fri Jun 05 17:46:10 2026 +0200 @@ -988,6 +988,15 @@ case ValueRepresentation_UnlimitedText: return value.size() <= (static_cast<uint64_t>(1) << 32) - 2; + case ValueRepresentation_OtherVeryLong: + return true; + + case ValueRepresentation_SignedVeryLong: + return value.size() == 8; + + case ValueRepresentation_UnsignedVeryLong: + return value.size() == 8; + default: // Assume unsupported tags are OK return true;
--- a/OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.cpp Fri Jun 05 17:25:30 2026 +0200 +++ b/OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.cpp Fri Jun 05 17:46:10 2026 +0200 @@ -2020,17 +2020,21 @@ case EVR_OB: return ValueRepresentation_OtherByte; + case EVR_OD: #if DCMTK_VERSION_NUMBER >= 361 - case EVR_OD: 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; + case EVR_OL: #if DCMTK_VERSION_NUMBER >= 361 - case EVR_OL: return ValueRepresentation_OtherLong; +#else + throw OrthancException(ErrorCode_NotSupported, "OL value representation is not supported, as using DCMTK <= 3.6.0"); #endif case EVR_OW: @@ -2057,9 +2061,11 @@ case EVR_TM: return ValueRepresentation_Time; + case EVR_UC: #if DCMTK_VERSION_NUMBER >= 361 - case EVR_UC: return ValueRepresentation_UnlimitedCharacters; +#else + throw OrthancException(ErrorCode_NotSupported, "UC value representation is not supported, as using DCMTK <= 3.6.0"); #endif case EVR_UI: @@ -2071,9 +2077,11 @@ case EVR_UN: return ValueRepresentation_Unknown; + case EVR_UR: #if DCMTK_VERSION_NUMBER >= 361 - case EVR_UR: return ValueRepresentation_UniversalResource; +#else + throw OrthancException(ErrorCode_NotSupported, "UR value representation is not supported, as using DCMTK <= 3.6.0"); #endif case EVR_US: @@ -2082,6 +2090,27 @@ case EVR_UT: return ValueRepresentation_UnlimitedText; + 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 + + 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 + + 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: return ValueRepresentation_NotSupported; }
--- a/OrthancFramework/Sources/DicomParsing/ToDcmtkBridge.cpp Fri Jun 05 17:25:30 2026 +0200 +++ b/OrthancFramework/Sources/DicomParsing/ToDcmtkBridge.cpp Fri Jun 05 17:46:10 2026 +0200 @@ -79,7 +79,7 @@ #if DCMTK_VERSION_NUMBER >= 361 return EVR_OD; #else - throw OrthancException(ErrorCode_ParameterOutOfRange, "OD value representation is not supported, as using DCMTK <= 3.6.0"); + throw OrthancException(ErrorCode_NotSupported, "OD value representation is not supported, as using DCMTK <= 3.6.0"); #endif case ValueRepresentation_OtherFloat: @@ -89,7 +89,7 @@ #if DCMTK_VERSION_NUMBER >= 361 return EVR_OL; #else - throw OrthancException(ErrorCode_ParameterOutOfRange, "OL value representation is not supported, as using DCMTK <= 3.6.0"); + throw OrthancException(ErrorCode_NotSupported, "OL value representation is not supported, as using DCMTK <= 3.6.0"); #endif case ValueRepresentation_OtherWord: @@ -120,7 +120,7 @@ #if DCMTK_VERSION_NUMBER >= 361 return EVR_UC; #else - throw OrthancException(ErrorCode_ParameterOutOfRange, "UC value representation is not supported, as using DCMTK <= 3.6.0"); + throw OrthancException(ErrorCode_NotSupported, "UC value representation is not supported, as using DCMTK <= 3.6.0"); #endif case ValueRepresentation_UniqueIdentifier: @@ -136,7 +136,7 @@ #if DCMTK_VERSION_NUMBER >= 361 return EVR_UR; #else - throw OrthancException(ErrorCode_ParameterOutOfRange, "UR value representation is not supported, as using DCMTK <= 3.6.0"); + throw OrthancException(ErrorCode_NotSupported, "UR value representation is not supported, as using DCMTK <= 3.6.0"); #endif case ValueRepresentation_UnsignedShort: @@ -145,6 +145,27 @@ case ValueRepresentation_UnlimitedText: return EVR_UT; + case ValueRepresentation_OtherVeryLong: +#if DCMTK_VERSION_NUMBER >= 365 + return EVR_OV; +#else + throw OrthancException(ErrorCode_NotSupported, "OV value representation is not supported, as using DCMTK <= 3.6.4"); +#endif + + case ValueRepresentation_SignedVeryLong: +#if DCMTK_VERSION_NUMBER >= 365 + return EVR_SV; +#else + throw OrthancException(ErrorCode_NotSupported, "SV value representation is not supported, as using DCMTK <= 3.6.4"); +#endif + + case ValueRepresentation_UnsignedVeryLong: +#if DCMTK_VERSION_NUMBER >= 365 + return EVR_UV; +#else + throw OrthancException(ErrorCode_NotSupported, "UV value representation is not supported, as using DCMTK <= 3.6.4"); +#endif + default: throw OrthancException(ErrorCode_ParameterOutOfRange); }
--- a/OrthancFramework/Sources/Enumerations.cpp Fri Jun 05 17:25:30 2026 +0200 +++ b/OrthancFramework/Sources/Enumerations.cpp Fri Jun 05 17:46:10 2026 +0200 @@ -984,6 +984,15 @@ case ValueRepresentation_UnlimitedText: // UT return "UT"; + case ValueRepresentation_OtherVeryLong: // OV (new in Orthanc 1.12.12) + return "OV"; + + case ValueRepresentation_SignedVeryLong: // SV (new in Orthanc 1.12.12) + return "SV"; + + case ValueRepresentation_UnsignedVeryLong: // UV (new in Orthanc 1.12.12) + return "UV"; + case ValueRepresentation_NotSupported: return "Not supported"; @@ -1496,6 +1505,18 @@ { return ValueRepresentation_UnlimitedText; } + else if (vr == "OV") + { + return ValueRepresentation_OtherVeryLong; + } + else if (vr == "SV") + { + return ValueRepresentation_SignedVeryLong; + } + else if (vr == "UV") + { + return ValueRepresentation_UnsignedVeryLong; + } else { std::string s = "Unsupported value representation encountered: " + vr; @@ -2393,6 +2414,9 @@ case ValueRepresentation_UnsignedLong: // UL (uint32_t) case ValueRepresentation_Unknown: // UN case ValueRepresentation_UnsignedShort: // US (uint16_t) + case ValueRepresentation_OtherVeryLong: // OL (8 bytes) + case ValueRepresentation_SignedVeryLong: // SL (int64_t) + case ValueRepresentation_UnsignedVeryLong: // UL (uint64_t) { return true; }
--- a/OrthancFramework/Sources/Enumerations.h Fri Jun 05 17:25:30 2026 +0200 +++ b/OrthancFramework/Sources/Enumerations.h Fri Jun 05 17:46:10 2026 +0200 @@ -613,6 +613,9 @@ ValueRepresentation_UniversalResource = 29, // UR (URI or URL) ValueRepresentation_UnsignedShort = 30, // US (uint16_t) ValueRepresentation_UnlimitedText = 31, // UT + ValueRepresentation_OtherVeryLong = 32, // OV (8 bytes, new in Orthanc 1.12.12) + ValueRepresentation_SignedVeryLong = 33, // SV (int64_t, new in Orthanc 1.12.12) + ValueRepresentation_UnsignedVeryLong = 34, // UV (uint64_t, new in Orthanc 1.12.12) ValueRepresentation_NotSupported // Not supported by Orthanc, or tag not in dictionary };
--- a/OrthancServer/Plugins/Engine/PluginsEnumerations.cpp Fri Jun 05 17:25:30 2026 +0200 +++ b/OrthancServer/Plugins/Engine/PluginsEnumerations.cpp Fri Jun 05 17:46:10 2026 +0200 @@ -412,6 +412,15 @@ case OrthancPluginValueRepresentation_UR: return ValueRepresentation_UniversalResource; + case OrthancPluginValueRepresentation_OV: + return ValueRepresentation_OtherVeryLong; + + case OrthancPluginValueRepresentation_SV: + return ValueRepresentation_SignedVeryLong; + + case OrthancPluginValueRepresentation_UV: + return ValueRepresentation_UnsignedVeryLong; + default: throw OrthancException(ErrorCode_ParameterOutOfRange); } @@ -515,6 +524,15 @@ case ValueRepresentation_UniversalResource: return OrthancPluginValueRepresentation_UR; + case ValueRepresentation_OtherVeryLong: + return OrthancPluginValueRepresentation_OV; + + case ValueRepresentation_SignedVeryLong: + return OrthancPluginValueRepresentation_SV; + + case ValueRepresentation_UnsignedVeryLong: + return OrthancPluginValueRepresentation_UV; + default: throw OrthancException(ErrorCode_ParameterOutOfRange); }
--- a/OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h Fri Jun 05 17:25:30 2026 +0200 +++ b/OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h Fri Jun 05 17:46:10 2026 +0200 @@ -919,6 +919,9 @@ OrthancPluginValueRepresentation_OL = 29, /*!< Other Long (new in Orthanc 1.12.12) */ OrthancPluginValueRepresentation_UC = 30, /*!< Unlimited Characters (new in Orthanc 1.12.12) */ OrthancPluginValueRepresentation_UR = 31, /*!< URI / URL (new in Orthanc 1.12.12) */ + OrthancPluginValueRepresentation_OV = 32, /*!< Other Very Long (new in Orthanc 1.12.12) */ + OrthancPluginValueRepresentation_SV = 33, /*!< Signed Very Long (new in Orthanc 1.12.12) */ + OrthancPluginValueRepresentation_UV = 34, /*!< Unsigned Very Long (new in Orthanc 1.12.12) */ _OrthancPluginValueRepresentation_INTERNAL = 0x7fffffff } OrthancPluginValueRepresentation;
