comparison Applications/Samples/SimpleViewerApplication.h @ 317:b66d13708f40 am-2

cleanup
author am@osimis.io
date Fri, 05 Oct 2018 11:57:36 +0200
parents be2660b6e40a
children 3a4ca166fafa
comparison
equal deleted inserted replaced
315:aad37d0b6407 317:b66d13708f40
277 277
278 // hierarchy 278 // hierarchy
279 mainLayout_->AddWidget(thumbnailsLayout_); 279 mainLayout_->AddWidget(thumbnailsLayout_);
280 mainLayout_->AddWidget(mainWidget_); 280 mainLayout_->AddWidget(mainWidget_);
281 281
282 orthancApiClient_.reset(new OrthancApiClient(IObserver::broker_, context_->GetWebService()));
283
282 // sources 284 // sources
283 smartLoader_.reset(new SmartLoader(IObserver::broker_, context_->GetWebService())); 285 smartLoader_.reset(new SmartLoader(IObserver::broker_, *orthancApiClient_));
284 smartLoader_->SetImageQuality(SliceImageQuality_FullPam); 286 smartLoader_->SetImageQuality(SliceImageQuality_FullPam);
285 287
286 mainLayout_->SetTransmitMouseOver(true); 288 mainLayout_->SetTransmitMouseOver(true);
287 mainWidgetInteractor_.reset(new MainWidgetInteractor(*this)); 289 mainWidgetInteractor_.reset(new MainWidgetInteractor(*this));
288 mainWidget_->SetInteractor(*mainWidgetInteractor_); 290 mainWidget_->SetInteractor(*mainWidgetInteractor_);
290 } 292 }
291 293
292 statusBar.SetMessage("Use the key \"s\" to reinitialize the layout"); 294 statusBar.SetMessage("Use the key \"s\" to reinitialize the layout");
293 statusBar.SetMessage("Use the key \"n\" to go to next image in the main viewport"); 295 statusBar.SetMessage("Use the key \"n\" to go to next image in the main viewport");
294 296
295 orthancApiClient_.reset(new OrthancApiClient(IObserver::broker_, context_->GetWebService()));
296 297
297 if (parameters.count("studyId") < 1) 298 if (parameters.count("studyId") < 1)
298 { 299 {
299 LOG(WARNING) << "The study ID is missing, will take the first studyId found in Orthanc"; 300 LOG(WARNING) << "The study ID is missing, will take the first studyId found in Orthanc";
300 orthancApiClient_->GetJsonAsync("/studies", new Callable<SimpleViewerApplication, OrthancApiClient::JsonResponseReadyMessage>(*this, &SimpleViewerApplication::OnStudyListReceived)); 301 orthancApiClient_->GetJsonAsync("/studies", new Callable<SimpleViewerApplication, OrthancApiClient::JsonResponseReadyMessage>(*this, &SimpleViewerApplication::OnStudyListReceived));