comparison 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
comparison
equal deleted inserted replaced
1905:8b1baa2315b8 1906:d7c1cb559431
2373 boost::mutex::scoped_lock lock(pimpl_->worklistCallbackMutex_); 2373 boost::mutex::scoped_lock lock(pimpl_->worklistCallbackMutex_);
2374 return pimpl_->worklistCallback_ != NULL; 2374 return pimpl_->worklistCallback_ != NULL;
2375 } 2375 }
2376 2376
2377 2377
2378 bool OrthancPlugins::HasCustomImageDecoder()
2379 {
2380 boost::mutex::scoped_lock lock(pimpl_->decodeImageCallbackMutex_);
2381 return (pimpl_->decodeImageCallback_ != NULL);
2382 }
2383
2384
2378 ImageAccessor* OrthancPlugins::Decode(const void* dicom, 2385 ImageAccessor* OrthancPlugins::Decode(const void* dicom,
2379 size_t size, 2386 size_t size,
2380 unsigned int frame) 2387 unsigned int frame)
2381 { 2388 {
2382 { 2389 {
2393 LOG(WARNING) << "The custom image decoder cannot handle an image, fallback to the built-in decoder"; 2400 LOG(WARNING) << "The custom image decoder cannot handle an image, fallback to the built-in decoder";
2394 } 2401 }
2395 } 2402 }
2396 2403
2397 DefaultDicomImageDecoder defaultDecoder; 2404 DefaultDicomImageDecoder defaultDecoder;
2398 return defaultDecoder.Decode(dicom, size, frame); 2405 return defaultDecoder.Decode(dicom, size, frame); // TODO RETURN NULL ???
2399 } 2406 }
2400 } 2407 }