diff Plugins/Engine/OrthancPlugins.cpp @ 1906:d7c1cb559431

optimization for multi-frame images
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 05 Jan 2016 17:45:27 +0100
parents 8b0ee8d5e6d0
children 5bcf721bde4f
line wrap: on
line diff
--- a/Plugins/Engine/OrthancPlugins.cpp	Tue Jan 05 17:25:01 2016 +0100
+++ b/Plugins/Engine/OrthancPlugins.cpp	Tue Jan 05 17:45:27 2016 +0100
@@ -2375,6 +2375,13 @@
   }
 
 
+  bool OrthancPlugins::HasCustomImageDecoder()
+  {
+    boost::mutex::scoped_lock lock(pimpl_->decodeImageCallbackMutex_);
+    return (pimpl_->decodeImageCallback_ != NULL);
+  }
+
+
   ImageAccessor*  OrthancPlugins::Decode(const void* dicom,
                                          size_t size,
                                          unsigned int frame)
@@ -2395,6 +2402,6 @@
     }
 
     DefaultDicomImageDecoder defaultDecoder;
-    return defaultDecoder.Decode(dicom, size, frame);
+    return defaultDecoder.Decode(dicom, size, frame);  // TODO RETURN NULL ???
   }
 }