Mercurial > hg > orthanc-transfers
comparison Framework/SourceDicomInstance.cpp @ 8:4c3437217518
fix for compatibility with simplified OrthancPluginCppWrapper
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 05 Dec 2018 09:16:51 +0100 |
parents | 95226b754d9e |
children | 7e207ade2f1a |
comparison
equal
deleted
inserted
replaced
7:151e29acbb13 | 8:4c3437217518 |
---|---|
24 #include <Plugins/Samples/Common/OrthancPluginCppWrapper.h> | 24 #include <Plugins/Samples/Common/OrthancPluginCppWrapper.h> |
25 | 25 |
26 | 26 |
27 namespace OrthancPlugins | 27 namespace OrthancPlugins |
28 { | 28 { |
29 SourceDicomInstance::SourceDicomInstance(OrthancPluginContext* context, | 29 SourceDicomInstance::SourceDicomInstance(const std::string& instanceId) |
30 const std::string& instanceId) : | |
31 context_(context) | |
32 { | 30 { |
33 LOG(INFO) << "Transfers accelerator reading DICOM instance: " << instanceId; | 31 LOG(INFO) << "Transfers accelerator reading DICOM instance: " << instanceId; |
34 | 32 |
35 MemoryBuffer buffer(context); | 33 MemoryBuffer buffer; |
36 buffer.GetDicomInstance(instanceId); | 34 buffer.GetDicomInstance(instanceId); |
37 | 35 |
38 info_.reset(new DicomInstanceInfo(instanceId, buffer)); | 36 info_.reset(new DicomInstanceInfo(instanceId, buffer)); |
39 | 37 |
40 buffer_ = buffer.Release(); | 38 buffer_ = buffer.Release(); |
41 } | 39 } |
42 | 40 |
43 | 41 |
44 SourceDicomInstance::~SourceDicomInstance() | 42 SourceDicomInstance::~SourceDicomInstance() |
45 { | 43 { |
46 OrthancPluginFreeMemoryBuffer(context_, &buffer_); | 44 OrthancPluginFreeMemoryBuffer(OrthancPlugins::GetGlobalContext(), &buffer_); |
47 } | 45 } |
48 | 46 |
49 | 47 |
50 const DicomInstanceInfo& SourceDicomInstance::GetInfo() const | 48 const DicomInstanceInfo& SourceDicomInstance::GetInfo() const |
51 { | 49 { |