diff OrthancServer/ParsedDicomFile.cpp @ 1161:82cbf1480aac db-changes

mainline->db-changes integration
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 17 Sep 2014 12:38:28 +0200
parents 80671157d051
children 6e7e5ed91c2d
line wrap: on
line diff
--- a/OrthancServer/ParsedDicomFile.cpp	Wed Sep 17 10:25:41 2014 +0200
+++ b/OrthancServer/ParsedDicomFile.cpp	Wed Sep 17 12:38:28 2014 +0200
@@ -80,6 +80,7 @@
 
 #include "ParsedDicomFile.h"
 
+#include "ServerToolbox.h"
 #include "FromDcmtkBridge.h"
 #include "ToDcmtkBridge.h"
 #include "Internals/DicomImageDecoder.h"
@@ -1285,4 +1286,17 @@
     Replace(DICOM_TAG_SPECIFIC_CHARACTER_SET, s, DicomReplaceMode_InsertIfAbsent);
   }
 
+  void ParsedDicomFile::ToJson(Json::Value& target, bool simplify)
+  {
+    if (simplify)
+    {
+      Json::Value tmp;
+      FromDcmtkBridge::ToJson(tmp, *pimpl_->file_->getDataset());
+      SimplifyTags(target, tmp);
+    }
+    else
+    {
+      FromDcmtkBridge::ToJson(target, *pimpl_->file_->getDataset());
+    }
+  }
 }