diff Plugins/Samples/Common/OrthancPluginCppWrapper.cpp @ 2206:27106f7e3759

more refactoring of the worklist sample
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 08 Dec 2016 16:29:34 +0100
parents 395522e46b2b
children c02f6ec404d8
line wrap: on
line diff
--- a/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp	Thu Dec 08 16:16:25 2016 +0100
+++ b/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp	Thu Dec 08 16:29:34 2016 +0100
@@ -337,13 +337,14 @@
   }
 
   
-  void OrthancString::DicomToJson(const OrthancPlugins::MemoryBuffer& dicom,
-                                  OrthancPluginDicomToJsonFormat format,
-                                  OrthancPluginDicomToJsonFlags flags,
-                                  uint32_t maxStringLength)
+  void MemoryBuffer::DicomToJson(Json::Value& target,
+                                 OrthancPluginDicomToJsonFormat format,
+                                 OrthancPluginDicomToJsonFlags flags,
+                                 uint32_t maxStringLength)
   {
-    Assign(OrthancPluginDicomBufferToJson(context_, dicom.GetData(), dicom.GetSize(), 
-                                          format, flags, maxStringLength));
+    OrthancString str(context_);
+    str.Assign(OrthancPluginDicomBufferToJson(context_, GetData(), GetSize(), format, flags, maxStringLength));
+    str.ToJson(target);
   }