From ce4f422636ff94e4462cbd0f13f3c5dac66ce545 Mon Sep 17 00:00:00 2001 From: Simon Rit Date: Fri, 8 Nov 2013 12:21:48 +0100 Subject: [PATCH] When clicking on the all button, also propagate fusion and overlay W/L --- vv/vvMainWindow.cxx | 10 ++++++++++ vv/vvOverlayPanel.cxx | 2 +- vv/vvSlicer.cxx | 6 ++++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index 15e1d91..e4a6c55 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -1857,12 +1857,22 @@ void vvMainWindow::ApplyWindowLevelToAllImages() double window = mSlicerManagers[index]->GetColorWindow(); double level = mSlicerManagers[index]->GetColorLevel(); + double fusWindow = mSlicerManagers[index]->GetFusionWindow(); + double fusLevel = mSlicerManagers[index]->GetFusionLevel(); + + double overWindow = mSlicerManagers[index]->GetOverlayColorWindow(); + double overLevel = mSlicerManagers[index]->GetOverlayColorLevel(); + for (unsigned int i = 0; i < mSlicerManagers.size(); i++) { if (mSlicerManagers[i] == NULL) continue; mSlicerManagers[i]->SetColorWindow(window); mSlicerManagers[i]->SetColorLevel(level); mSlicerManagers[i]->SetPreset(WL_USER); + mSlicerManagers[i]->SetFusionWindow(fusWindow); + mSlicerManagers[i]->SetFusionLevel(fusLevel); + mSlicerManagers[i]->SetOverlayColorWindow(overWindow); + mSlicerManagers[i]->SetOverlayColorLevel(overLevel); mSlicerManagers[i]->Render(); } } diff --git a/vv/vvOverlayPanel.cxx b/vv/vvOverlayPanel.cxx index 3490933..2a77e8d 100644 --- a/vv/vvOverlayPanel.cxx +++ b/vv/vvOverlayPanel.cxx @@ -233,7 +233,7 @@ void vvOverlayPanel::setFusionProperty() if (disableFusionSignals) return; - fusionOpacitySpin->setValue(opacityHorizontalSlider->value()); + fusionOpacitySpin->setValue(opacityHorizontalSlider->value()); fusionThresSpin->setValue(thresOpacityHorizontalSlider->value()); emit FusionPropertyUpdated(opacityHorizontalSlider->value(), thresOpacityHorizontalSlider->value(), fusionColorMapComboBox->currentIndex(), diff --git a/vv/vvSlicer.cxx b/vv/vvSlicer.cxx index ed53d2c..cd65e2f 100644 --- a/vv/vvSlicer.cxx +++ b/vv/vvSlicer.cxx @@ -1307,14 +1307,16 @@ double vvSlicer::GetOverlayColorLevel() //---------------------------------------------------------------------------- void vvSlicer::SetOverlayColorWindow(double window) { - mOverlayMapper->SetWindow(window); + if(mOverlayMapper) + mOverlayMapper->SetWindow(window); } //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- void vvSlicer::SetOverlayColorLevel(double level) { - mOverlayMapper->SetLevel(level); + if(mOverlayMapper) + mOverlayMapper->SetLevel(level); } //---------------------------------------------------------------------------- -- 2.47.1