changeset 5309:fb231da5c0f1

support multiple values for UL/OL
author Alain Mazy <am@osimis.io>
date Wed, 07 Jun 2023 10:48:14 +0200
parents 1e23bfb0f732
children b5c502bcaf99
files OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.cpp
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.cpp	Tue Jun 06 17:04:23 2023 +0200
+++ b/OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.cpp	Wed Jun 07 10:48:14 2023 +0200
@@ -1981,7 +1981,14 @@
         case EVR_OL:  // other long (requires byte-swapping)
 #endif
         {
-          ok = element.putUint32(boost::lexical_cast<Uint32>(*decoded)).good();
+          if (decoded->find('\\') != std::string::npos)
+          {
+            ok = element.putString(decoded->c_str()).good();
+          }
+          else
+          {
+            ok = element.putUint32(boost::lexical_cast<Uint32>(*decoded)).good();
+          }
           break;
         }