--- a/Plugin/WadoRs.cpp Tue Dec 02 17:17:12 2025 +0100 +++ b/Plugin/WadoRs.cpp Tue Dec 09 07:57:08 2025 +0100 @@ -32,9 +32,12 @@ #include #include #include -#include #include +#if ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 12, 11) +# include +#endif + #include #include #include @@ -445,11 +448,16 @@ class ThreadedInstanceLoader : public InstanceLoader { +private: std::vector threads_; Orthanc::SharedMessageQueue instancesToPreload_; +#if ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 12, 11) Orthanc::BlockingSharedMessageQueue loadedInstances_; +#else + Orthanc::SharedMessageQueue loadedInstances_; +#endif bool loadersShouldStop_; @@ -457,7 +465,11 @@ ThreadedInstanceLoader(size_t threadCount, bool transcode, Orthanc::DicomTransferSyntax transferSyntax) : InstanceLoader(transcode, transferSyntax), instancesToPreload_(0), - loadedInstances_(3*threadCount), // to limit the number of loaded instances in memory +#if ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 12, 11) + loadedInstances_(3 * threadCount), // to limit the number of loaded instances in memory +#else + loadedInstances_(0), // don't limit the number of loaded instances, otherwise extra instances would be lost +#endif loadersShouldStop_(false) { for (size_t i = 0; i < threadCount; i++)