From: Romulo Pinho Date: Fri, 20 Apr 2012 11:16:00 +0000 (+0200) Subject: fine tuning fusion legend X-Git-Tag: v1.3.0~46 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=6102bdc166f7d51e04d24a0ce5898e8e3baf89ae;p=clitk.git fine tuning fusion legend - must not appear with overlays - invisible by default - disappears if fusion image is not displayed --- 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);