]> 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 bbd2443a641274868b81007fc149f984d9df754c..346bd2c49b7c5c4a5a9f705c7755b4e49941922f 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 cba898cc431f06e80b10fab19d2f6191130ca890..5f86337f0238f96f725e1405b83ad6eb6c84eacf 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);