comparison Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.cpp @ 1135:a0a33e5ea5bb broker

IOracleCommand::Clone()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 06 Nov 2019 17:34:58 +0100
parents 87fbeb823375
children 34ee7204fde3
comparison
equal deleted inserted replaced
1134:87fbeb823375 1135:a0a33e5ea5bb
235 CheckSliceIndex(index); 235 CheckSliceIndex(index);
236 slicesRevision_[index] ++; 236 slicesRevision_[index] ++;
237 } 237 }
238 238
239 239
240 static unsigned int GetSliceIndexPayload(const IOracleCommand& command) 240 static unsigned int GetSliceIndexPayload(const OracleCommandBase& command)
241 { 241 {
242 assert(command.HasPayload());
242 return dynamic_cast< const Orthanc::SingleValueObject<unsigned int>& >(command.GetPayload()).GetValue(); 243 return dynamic_cast< const Orthanc::SingleValueObject<unsigned int>& >(command.GetPayload()).GetValue();
243 } 244 }
244 245
245 246
246 void OrthancSeriesVolumeProgressiveLoader::ScheduleNextSliceDownload() 247 void OrthancSeriesVolumeProgressiveLoader::ScheduleNextSliceDownload()
392 } 393 }
393 394
394 395
395 void OrthancSeriesVolumeProgressiveLoader::LoadBestQualitySliceContent(const GetOrthancImageCommand::SuccessMessage& message) 396 void OrthancSeriesVolumeProgressiveLoader::LoadBestQualitySliceContent(const GetOrthancImageCommand::SuccessMessage& message)
396 { 397 {
397 SetSliceContent(GetSliceIndexPayload(message.GetCommand()), message.GetImage(), BEST_QUALITY); 398 SetSliceContent(GetSliceIndexPayload(message.GetOrigin()), message.GetImage(), BEST_QUALITY);
398 } 399 }
399 400
400 401
401 void OrthancSeriesVolumeProgressiveLoader::LoadJpegSliceContent(const GetOrthancWebViewerJpegCommand::SuccessMessage& message) 402 void OrthancSeriesVolumeProgressiveLoader::LoadJpegSliceContent(const GetOrthancWebViewerJpegCommand::SuccessMessage& message)
402 { 403 {
403 unsigned int quality; 404 unsigned int quality;
404 405
405 switch (dynamic_cast<const GetOrthancWebViewerJpegCommand&>(message.GetCommand()).GetQuality()) 406 switch (dynamic_cast<const GetOrthancWebViewerJpegCommand&>(message.GetOrigin()).GetQuality())
406 { 407 {
407 case 50: 408 case 50:
408 quality = LOW_QUALITY; 409 quality = LOW_QUALITY;
409 break; 410 break;
410 411
414 415
415 default: 416 default:
416 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); 417 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError);
417 } 418 }
418 419
419 SetSliceContent(GetSliceIndexPayload(message.GetCommand()), message.GetImage(), quality); 420 SetSliceContent(GetSliceIndexPayload(message.GetOrigin()), message.GetImage(), quality);
420 } 421 }
421 422
422 423
423 OrthancSeriesVolumeProgressiveLoader::OrthancSeriesVolumeProgressiveLoader(const boost::shared_ptr<DicomVolumeImage>& volume, 424 OrthancSeriesVolumeProgressiveLoader::OrthancSeriesVolumeProgressiveLoader(const boost::shared_ptr<DicomVolumeImage>& volume,
424 IOracle& oracle, 425 IOracle& oracle,