From 6102bdc166f7d51e04d24a0ce5898e8e3baf89ae Mon Sep 17 00:00:00 2001 From: Romulo Pinho Date: Fri, 20 Apr 2012 13:16:00 +0200 Subject: [PATCH] fine tuning fusion legend - must not appear with overlays - invisible by default - disappears if fusion image is not displayed --- vv/vvOverlayPanel.cxx | 2 +- vv/vvSlicer.cxx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vv/vvOverlayPanel.cxx b/vv/vvOverlayPanel.cxx index bbd2443..346bd2c 100644 --- a/vv/vvOverlayPanel.cxx +++ b/vv/vvOverlayPanel.cxx @@ -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())); diff --git a/vv/vvSlicer.cxx b/vv/vvSlicer.cxx index cba898c..5f86337 100644 --- a/vv/vvSlicer.cxx +++ b/vv/vvSlicer.cxx @@ -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); -- 2.45.1