comparison Applications/Samples/SimpleViewerApplicationSingleFile.h @ 1222:21c2b0eee53c broker

deprecating MessageHandler
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 07 Dec 2019 18:18:07 +0100
parents d7887f88710f
children 0ca50d275b9a
comparison
equal deleted inserted replaced
1218:6f3f1ef347a3 1222:21c2b0eee53c
328 if (parameters.count("studyId") < 1) 328 if (parameters.count("studyId") < 1)
329 { 329 {
330 LOG(WARNING) << "The study ID is missing, will take the first studyId found in Orthanc"; 330 LOG(WARNING) << "The study ID is missing, will take the first studyId found in Orthanc";
331 context->GetOrthancApiClient()->GetJsonAsync( 331 context->GetOrthancApiClient()->GetJsonAsync(
332 "/studies", 332 "/studies",
333 new Callable<SimpleViewerApplication, Deprecated::OrthancApiClient::JsonResponseReadyMessage> 333 new Deprecated::DeprecatedCallable<SimpleViewerApplication, Deprecated::OrthancApiClient::JsonResponseReadyMessage>
334 (GetSharedObserver(), &SimpleViewerApplication::OnStudyListReceived)); 334 (GetSharedObserver(), &SimpleViewerApplication::OnStudyListReceived));
335 } 335 }
336 else 336 else
337 { 337 {
338 SelectStudy(parameters["studyId"].as<std::string>()); 338 SelectStudy(parameters["studyId"].as<std::string>());
358 { 358 {
359 for (size_t i=0; i < response["Series"].size(); i++) 359 for (size_t i=0; i < response["Series"].size(); i++)
360 { 360 {
361 context_->GetOrthancApiClient()->GetJsonAsync( 361 context_->GetOrthancApiClient()->GetJsonAsync(
362 "/series/" + response["Series"][(int)i].asString(), 362 "/series/" + response["Series"][(int)i].asString(),
363 new Callable<SimpleViewerApplication, Deprecated::OrthancApiClient::JsonResponseReadyMessage> 363 new Deprecated::DeprecatedCallable<SimpleViewerApplication, Deprecated::OrthancApiClient::JsonResponseReadyMessage>
364 (GetSharedObserver(), &SimpleViewerApplication::OnSeriesReceived)); 364 (GetSharedObserver(), &SimpleViewerApplication::OnSeriesReceived));
365 } 365 }
366 } 366 }
367 } 367 }
368 368
409 409
410 void SelectStudy(const std::string& studyId) 410 void SelectStudy(const std::string& studyId)
411 { 411 {
412 LOG(INFO) << "Selecting study: " << studyId; 412 LOG(INFO) << "Selecting study: " << studyId;
413 context_->GetOrthancApiClient()->GetJsonAsync( 413 context_->GetOrthancApiClient()->GetJsonAsync(
414 "/studies/" + studyId, new Callable<SimpleViewerApplication, Deprecated::OrthancApiClient::JsonResponseReadyMessage> 414 "/studies/" + studyId, new Deprecated::DeprecatedCallable<SimpleViewerApplication, Deprecated::OrthancApiClient::JsonResponseReadyMessage>
415 (GetSharedObserver(), &SimpleViewerApplication::OnStudyReceived)); 415 (GetSharedObserver(), &SimpleViewerApplication::OnStudyReceived));
416 } 416 }
417 417
418 void OnWidgetGeometryChanged(const Deprecated::SliceViewerWidget::GeometryChangedMessage& message) 418 void OnWidgetGeometryChanged(const Deprecated::SliceViewerWidget::GeometryChangedMessage& message)
419 { 419 {