diff Plugins/Engine/OrthancPlugins.cpp @ 3980:e42f5445d20d

Fix decoding of DICOM images for plugins
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 26 May 2020 09:04:00 +0200
parents 821715370890
children 4cd94ed75a5b
line wrap: on
line diff
--- a/Plugins/Engine/OrthancPlugins.cpp	Mon May 25 21:25:23 2020 +0200
+++ b/Plugins/Engine/OrthancPlugins.cpp	Tue May 26 09:04:00 2020 +0200
@@ -2922,7 +2922,8 @@
 
       case OrthancPluginImageFormat_Dicom:
       {
-        image.reset(Decode(p.data, p.size, 0));
+        PImpl::ServerContextLock lock(*pimpl_);
+        image.reset(lock.GetContext().DecodeDicomFrame(p.data, p.size, 0));
         break;
       }
 
@@ -3485,7 +3486,8 @@
 
       case _OrthancPluginService_DecodeDicomImage:
       {
-        result.reset(Decode(p.constBuffer, p.bufferSize, p.frameIndex));
+        PImpl::ServerContextLock lock(*pimpl_);
+        result.reset(lock.GetContext().DecodeDicomFrame(p.constBuffer, p.bufferSize, p.frameIndex));
         break;
       }