diff OrthancStone/Sources/Toolbox/OrthancDatasets/SimplifiedOrthancDataset.cpp @ 1571:85e117739eca

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 21 Sep 2020 17:46:39 +0200
parents 244ad1e4e76a
children 4fb8fdf03314
line wrap: on
line diff
--- a/OrthancStone/Sources/Toolbox/OrthancDatasets/SimplifiedOrthancDataset.cpp	Mon Sep 21 14:50:26 2020 +0200
+++ b/OrthancStone/Sources/Toolbox/OrthancDatasets/SimplifiedOrthancDataset.cpp	Mon Sep 21 17:46:39 2020 +0200
@@ -21,6 +21,9 @@
 
 #include "SimplifiedOrthancDataset.h"
 
+#include <OrthancException.h>
+#include <DicomParsing/FromDcmtkBridge.h>
+
 namespace OrthancStone
 {
   const Json::Value* SimplifiedOrthancDataset::LookupPath(const DicomPath& path) const
@@ -29,7 +32,8 @@
                                   
     for (unsigned int depth = 0; depth < path.GetPrefixLength(); depth++)
     {
-      const char* name = path.GetPrefixTag(depth).GetName();
+      const std::string name = Orthanc::FromDcmtkBridge::GetTagName(
+        path.GetPrefixTag(depth), "" /* no private creator */);
       if (content->type() != Json::objectValue)
       {
         throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat);
@@ -57,7 +61,8 @@
       }
     }
 
-    const char* name = path.GetFinalTag().GetName();
+    const std::string name = Orthanc::FromDcmtkBridge::GetTagName(
+      path.GetFinalTag(), "" /* no private creator */);
 
     if (content->type() != Json::objectValue)
     {