changeset 6930:e160f5ff7ebe

added OD, OL, UC, and UR values to the OrthancPluginValueRepresentation enumeration
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 05 Jun 2026 17:10:48 +0200
parents 9c2227f350a1
children 5e9dfa326055
files NEWS OrthancServer/Plugins/Engine/PluginsEnumerations.cpp OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h
diffstat 3 files changed, 27 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Fri Jun 05 16:54:10 2026 +0200
+++ b/NEWS	Fri Jun 05 17:10:48 2026 +0200
@@ -20,7 +20,6 @@
   - value = GetKeyValue(storeId, key)
   - DeleteKeyValue(storeId, key)
 
-
 REST API
 --------
 
@@ -38,8 +37,9 @@
 Plugin SDK
 ----------
 
-* Added OrthancPluginClearCurrentThreadName() to avoid storing thousands of thread
+* 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
 
 Maintenance
 -----------
--- a/OrthancServer/Plugins/Engine/PluginsEnumerations.cpp	Fri Jun 05 16:54:10 2026 +0200
+++ b/OrthancServer/Plugins/Engine/PluginsEnumerations.cpp	Fri Jun 05 17:10:48 2026 +0200
@@ -400,16 +400,20 @@
         case OrthancPluginValueRepresentation_UT:
           return ValueRepresentation_UnlimitedText;
 
+        case OrthancPluginValueRepresentation_OD:
+          return ValueRepresentation_OtherDouble;
+
+        case OrthancPluginValueRepresentation_OL:
+          return ValueRepresentation_OtherLong;
+
+        case OrthancPluginValueRepresentation_UC:
+          return ValueRepresentation_UnlimitedCharacters;
+
+        case OrthancPluginValueRepresentation_UR:
+          return ValueRepresentation_UniversalResource;
+
         default:
           throw OrthancException(ErrorCode_ParameterOutOfRange);
-
-          /*
-          Not supported as of DCMTK 3.6.0:
-          return ValueRepresentation_OtherDouble
-          return ValueRepresentation_OtherLong
-          return ValueRepresentation_UniversalResource
-          return ValueRepresentation_UnlimitedCharacters
-          */
       }
     }
 
@@ -499,13 +503,17 @@
         case ValueRepresentation_Unknown:
           return OrthancPluginValueRepresentation_UN;  // Unknown
 
-          // These VR are not supported as of DCMTK 3.6.0, so they are
-          // mapped to "UN" (unknown) VR in the plugins
         case ValueRepresentation_OtherDouble:          
+          return OrthancPluginValueRepresentation_OD;
+
         case ValueRepresentation_OtherLong:
-        case ValueRepresentation_UniversalResource:
+          return OrthancPluginValueRepresentation_OL;
+
         case ValueRepresentation_UnlimitedCharacters:
-          return OrthancPluginValueRepresentation_UN;
+          return OrthancPluginValueRepresentation_UC;
+
+        case ValueRepresentation_UniversalResource:
+          return OrthancPluginValueRepresentation_UR;
 
         default:
           throw OrthancException(ErrorCode_ParameterOutOfRange);
--- a/OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h	Fri Jun 05 16:54:10 2026 +0200
+++ b/OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h	Fri Jun 05 17:10:48 2026 +0200
@@ -883,7 +883,7 @@
 
 
   /**
-   * The value representations present in the DICOM standard (version 2013).
+   * The value representations present in the DICOM standard.
    * @ingroup Toolbox
    **/
   typedef enum
@@ -915,6 +915,10 @@
     OrthancPluginValueRepresentation_UN = 25,  /*!< Unknown */
     OrthancPluginValueRepresentation_US = 26,  /*!< Unsigned Short */
     OrthancPluginValueRepresentation_UT = 27,  /*!< Unlimited Text */
+    OrthancPluginValueRepresentation_OD = 28,  /*!< Other Double           (new in Orthanc 1.12.12) */
+    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_INTERNAL = 0x7fffffff
   } OrthancPluginValueRepresentation;