]> Creatis software - clitk.git/commitdiff
fine tuning fusion legend
authorRomulo Pinho <romulo.pinho@lyon.unicancer.fr>
Fri, 20 Apr 2012 11:16:00 +0000 (13:16 +0200)
committerRomulo Pinho <romulo.pinho@lyon.unicancer.fr>
Fri, 20 Apr 2012 11:16:00 +0000 (13:16 +0200)
- must not appear with overlays
- invisible by default
- disappears if fusion image is not displayed

vv/vvOverlayPanel.cxx
vv/vvSlicer.cxx

index bbd2443..346bd2c 100644 (file)
@@ -38,7 +38,7 @@ vvOverlayPanel::vvOverlayPanel(QWidget * parent):QWidget(parent)
   scaleSpinBox->setEnabled(0);
   lutCheckBox->hide();
   lutCheckBox->setEnabled(0);
-  fusionShowLegendCheckBox->setChecked(true);
+  fusionShowLegendCheckBox->setChecked(false);
   
   connect(subSamplingSpinBox,SIGNAL(editingFinished()),this,SLOT(setVFProperty()));
   connect(scaleSpinBox,SIGNAL(editingFinished()),this,SLOT(setVFProperty()));
index cba898c..5f86337 100644 (file)
@@ -130,7 +130,7 @@ vvSlicer::vvSlicer()
   legend->SetVisibility(0);
   legend->SetLabelFormat("%.1f");
   this->GetRenderer()->AddActor(legend);
-  showFusionLegend = true;
+  showFusionLegend = false;
 
   this->WindowLevel->Delete();
   this->WindowLevel = vvImageMapToWLColors::New();
@@ -1242,12 +1242,12 @@ double vvSlicer::GetScalarComponentAsDouble(vtkImageData *image, double X, doubl
 //----------------------------------------------------------------------------
 void vvSlicer::Render()
 {
-  if (this->mFusion && showFusionLegend) {
+  if (this->mFusion && mFusionActor->GetVisibility() && showFusionLegend) {
     legend->SetLookupTable(this->GetFusionMapper()->GetLookupTable());
     legend->UseOpacityOn();
     legend->SetVisibility(1);
   }
-  else if (this->GetWindowLevel()->GetLookupTable()) {// && !this->mOverlay && !this->mFusion) {
+  else if (this->GetWindowLevel()->GetLookupTable() && !this->mOverlay)  {
     legend->SetLookupTable(this->GetWindowLevel()->GetLookupTable());
     legend->UseOpacityOff();
     legend->SetVisibility(1);