Mercurial > hg > orthanc
comparison 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 |
comparison
equal
deleted
inserted
replaced
2205:395522e46b2b | 2206:27106f7e3759 |
---|---|
335 ORTHANC_PLUGINS_THROW_EXCEPTION(OrthancPluginErrorCode_BadFileFormat); | 335 ORTHANC_PLUGINS_THROW_EXCEPTION(OrthancPluginErrorCode_BadFileFormat); |
336 } | 336 } |
337 } | 337 } |
338 | 338 |
339 | 339 |
340 void OrthancString::DicomToJson(const OrthancPlugins::MemoryBuffer& dicom, | 340 void MemoryBuffer::DicomToJson(Json::Value& target, |
341 OrthancPluginDicomToJsonFormat format, | 341 OrthancPluginDicomToJsonFormat format, |
342 OrthancPluginDicomToJsonFlags flags, | 342 OrthancPluginDicomToJsonFlags flags, |
343 uint32_t maxStringLength) | 343 uint32_t maxStringLength) |
344 { | 344 { |
345 Assign(OrthancPluginDicomBufferToJson(context_, dicom.GetData(), dicom.GetSize(), | 345 OrthancString str(context_); |
346 format, flags, maxStringLength)); | 346 str.Assign(OrthancPluginDicomBufferToJson(context_, GetData(), GetSize(), format, flags, maxStringLength)); |
347 str.ToJson(target); | |
347 } | 348 } |
348 | 349 |
349 | 350 |
350 | 351 |
351 OrthancConfiguration::OrthancConfiguration(OrthancPluginContext* context) : | 352 OrthancConfiguration::OrthancConfiguration(OrthancPluginContext* context) : |