X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvOverlayPanel.cxx;fp=vv%2FvvOverlayPanel.cxx;h=e205c8770105857c7edf0a0a9424ffc819554b4c;hb=1548a47199250d3819961adb37becac65bc72f3c;hp=346bd2c49b7c5c4a5a9f705c7755b4e49941922f;hpb=3120a75ccfc05e6e5df576d8df817dae112528de;p=clitk.git diff --git a/vv/vvOverlayPanel.cxx b/vv/vvOverlayPanel.cxx index 346bd2c..e205c87 100644 --- a/vv/vvOverlayPanel.cxx +++ b/vv/vvOverlayPanel.cxx @@ -34,12 +34,14 @@ vvOverlayPanel::vvOverlayPanel(QWidget * parent):QWidget(parent) vFFrame->hide(); compareFrame->hide(); fusionFrame->hide(); + fCTUSFrame->hide(); subSamplingSpinBox->setEnabled(0); scaleSpinBox->setEnabled(0); lutCheckBox->hide(); lutCheckBox->setEnabled(0); fusionShowLegendCheckBox->setChecked(false); - + fCTUSActivateSpaceSyncCheckBox->setChecked(true); + connect(subSamplingSpinBox,SIGNAL(editingFinished()),this,SLOT(setVFProperty())); connect(scaleSpinBox,SIGNAL(editingFinished()),this,SLOT(setVFProperty())); connect(lutCheckBox,SIGNAL(clicked()),this,SLOT(setVFProperty())); @@ -58,7 +60,11 @@ vvOverlayPanel::vvOverlayPanel(QWidget * parent):QWidget(parent) connect(overlayLevelSpinBox,SIGNAL(valueChanged(double)),this,SLOT(setOverlayProperty())); connect(overlayLinkCheckBox,SIGNAL(stateChanged(int)),this,SLOT(setOverlayProperty())); + connect(fCTUSSlider,SIGNAL(valueChanged(int)),this,SLOT(setFusionSequenceProperty())); + connect(fCTUSActivateSpaceSyncCheckBox,SIGNAL(stateChanged(int)),this,SLOT(setFusionSequenceProperty())); + disableFusionSignals = false; + disableFusionSequenceSignals = false; } void vvOverlayPanel::getCurrentImageName(QString name) @@ -225,7 +231,7 @@ void vvOverlayPanel::setFusionProperty() { if (disableFusionSignals) return; - + fusionOpacitySpin->setValue(opacityHorizontalSlider->value()); fusionThresSpin->setValue(thresOpacityHorizontalSlider->value()); @@ -248,6 +254,41 @@ void vvOverlayPanel::getCurrentFusionInfo(int visibility,double value) valueFusionnedLabel->setText(fusionValue); } + +void vvOverlayPanel::getFusionSequenceProperty(int sequenceFrameIndex, bool spatialSync, unsigned int sequenceLenth) +{ + if (sequenceFrameIndex > -1) { + disableFusionSequenceSignals = true; + fCTUSFrame->show(); + fCTUSFrame->setEnabled(1); + fCTUSSlider->setEnabled(1); + fCTUSSlider->setValue(sequenceFrameIndex); + fCTUSSlider->setMaximum(sequenceLenth); + if (spatialSync) fCTUSActivateSpaceSyncCheckBox->setCheckState(Qt::Checked); + else fCTUSActivateSpaceSyncCheckBox->setCheckState(Qt::Unchecked); + disableFusionSequenceSignals = false; + setFusionSequenceProperty(); + } else { + fCTUSFrame->hide(); + fCTUSFrame->setEnabled(0); + fCTUSSlider->setEnabled(0); + fCTUSSlider->setValue(0); + fCTUSSlider->setMaximum(0); + fCTUSActivateSpaceSyncCheckBox->setCheckState(Qt::Unchecked); + } +} + + +void vvOverlayPanel::setFusionSequenceProperty() +{ + if (disableFusionSequenceSignals) + return; + + emit FusionSequencePropertyUpdated(fCTUSSlider->value(), fCTUSActivateSpaceSyncCheckBox->isChecked(), fCTUSSlider->maximum()); +} + + + void vvOverlayPanel::VFColorChangeRequest() { QColor color(vfColorButton->palette().color(QPalette::Background));