]> Creatis software - clitk.git/commitdiff
When clicking on the all button, also propagate fusion and overlay W/L
authorSimon Rit <simon.rit@creatis.insa-lyon.fr>
Fri, 8 Nov 2013 11:21:48 +0000 (12:21 +0100)
committerSimon Rit <simon.rit@creatis.insa-lyon.fr>
Fri, 8 Nov 2013 11:21:48 +0000 (12:21 +0100)
vv/vvMainWindow.cxx
vv/vvOverlayPanel.cxx
vv/vvSlicer.cxx

index 15e1d910c4163103205447bf5d35aebb8bb25d4b..e4a6c55588ff316817db7d4af74713c27805a730 100644 (file)
@@ -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();
   }
 }
index 3490933fb89b3ce180af5d8bdf1bc598d4167c77..2a77e8dcaff5a5a335c23f4366571dfb238691e2 100644 (file)
@@ -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(),
index ed53d2c83b138c600eeabf680da7edd775854cbc..cd65e2fdd722221e3414d39a56d3aa7685490044 100644 (file)
@@ -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);
 }
 //----------------------------------------------------------------------------