comparison Applications/Samples/Common/RtViewerView.cpp @ 1680:03afa09cfcf1

running the tests of the Orthanc Framework in WebAssembly
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 24 Nov 2020 16:39:54 +0100
parents 52b8b96cb55f
children 9ac2a65d4172
comparison
equal deleted inserted replaced
1679:5b8b88e5bfd6 1680:03afa09cfcf1
317 void RtViewerView::SetCtVolumeSlicer(const boost::shared_ptr<IVolumeSlicer>& volume, 317 void RtViewerView::SetCtVolumeSlicer(const boost::shared_ptr<IVolumeSlicer>& volume,
318 ILayerStyleConfigurator* style) 318 ILayerStyleConfigurator* style)
319 { 319 {
320 std::unique_ptr<IViewport::ILock> lock(viewport_->Lock()); 320 std::unique_ptr<IViewport::ILock> lock(viewport_->Lock());
321 ViewportController& controller = lock->GetController(); 321 ViewportController& controller = lock->GetController();
322 Scene2D& scene = controller.GetScene(); 322 const Scene2D& scene = controller.GetScene();
323 int depth = scene.GetMaxDepth() + 1; 323 int depth = scene.GetMaxDepth() + 1;
324 324
325 ctVolumeLayerSource_.reset(new VolumeSceneLayerSource(viewport_, depth, volume)); 325 ctVolumeLayerSource_.reset(new VolumeSceneLayerSource(viewport_, depth, volume));
326 326
327 if (style != NULL) 327 if (style != NULL)
335 void RtViewerView::SetDoseVolumeSlicer(const boost::shared_ptr<IVolumeSlicer>& volume, 335 void RtViewerView::SetDoseVolumeSlicer(const boost::shared_ptr<IVolumeSlicer>& volume,
336 ILayerStyleConfigurator* style) 336 ILayerStyleConfigurator* style)
337 { 337 {
338 std::unique_ptr<IViewport::ILock> lock(viewport_->Lock()); 338 std::unique_ptr<IViewport::ILock> lock(viewport_->Lock());
339 ViewportController& controller = lock->GetController(); 339 ViewportController& controller = lock->GetController();
340 Scene2D& scene = controller.GetScene(); 340 const Scene2D& scene = controller.GetScene();
341 int depth = scene.GetMaxDepth() + 1; 341 int depth = scene.GetMaxDepth() + 1;
342 342
343 doseVolumeLayerSource_.reset(new VolumeSceneLayerSource(viewport_, depth, volume)); 343 doseVolumeLayerSource_.reset(new VolumeSceneLayerSource(viewport_, depth, volume));
344 344
345 if (style != NULL) 345 if (style != NULL)
350 350
351 void RtViewerView::SetStructureSet(const boost::shared_ptr<DicomStructureSetLoader>& volume) 351 void RtViewerView::SetStructureSet(const boost::shared_ptr<DicomStructureSetLoader>& volume)
352 { 352 {
353 std::unique_ptr<IViewport::ILock> lock(viewport_->Lock()); 353 std::unique_ptr<IViewport::ILock> lock(viewport_->Lock());
354 ViewportController& controller = lock->GetController(); 354 ViewportController& controller = lock->GetController();
355 Scene2D& scene = controller.GetScene(); 355 const Scene2D& scene = controller.GetScene();
356 int depth = scene.GetMaxDepth() + 1; 356 int depth = scene.GetMaxDepth() + 1;
357 357
358 structLayerSource_.reset(new VolumeSceneLayerSource(viewport_, depth, volume)); 358 structLayerSource_.reset(new VolumeSceneLayerSource(viewport_, depth, volume));
359 } 359 }
360 } 360 }