+
+void vvOverlayPanel::getFusionSequenceProperty(int sequenceFrameIndex, bool spatialSync, unsigned int sequenceLenth, bool temporalSync)
+{
+ if (sequenceFrameIndex > -1) {
+ disableFusionSequenceSignals = true;
+ fCTUSFrame->show();
+ fCTUSFrame->setEnabled(1);
+ fCTUSSlider->setEnabled(1);
+ fCTUSSlider->setValue(sequenceFrameIndex);
+ fCTUSSlider->setMaximum(sequenceLenth-1); //the maximum IS included, since we start at 0, go until n-1!
+ if (spatialSync) fCTUSActivateSpaceSyncCheckBox->setCheckState(Qt::Checked);
+ else fCTUSActivateSpaceSyncCheckBox->setCheckState(Qt::Unchecked);
+ if (fCTUSActivateTimeSyncCheckBox->isEnabled()) {
+ if ( temporalSync ) fCTUSActivateTimeSyncCheckBox->setCheckState(Qt::Checked);
+ else fCTUSActivateTimeSyncCheckBox->setCheckState(Qt::Unchecked);
+ }
+ disableFusionSequenceSignals = false;
+ setFusionSequenceProperty();
+ } else {
+ disableFusionSequenceSignals = true;
+ fCTUSFrame->hide();
+ fCTUSFrame->setEnabled(0);
+ fCTUSSlider->setEnabled(0);
+ fCTUSSlider->setValue(0);
+ fCTUSSlider->setMaximum(0);
+ fCTUSActivateSpaceSyncCheckBox->setCheckState(Qt::Unchecked);
+ fCTUSActivateTimeSyncCheckBox->setCheckState(Qt::Unchecked);
+ disableFusionSequenceSignals = false;
+ setFusionSequenceProperty();
+ }
+}
+
+
+void vvOverlayPanel::setFusionSequenceProperty()
+{
+ if (disableFusionSequenceSignals)
+ return;
+ emit FusionSequencePropertyUpdated(fCTUSSlider->value(), fCTUSActivateSpaceSyncCheckBox->isChecked(), fCTUSSlider->maximum()+1, fCTUSActivateTimeSyncCheckBox->isChecked());
+}
+
+void vvOverlayPanel::enableFusionSequenceTemporalSync() {
+ bool backup = disableFusionSequenceSignals;
+ disableFusionSequenceSignals=true; //not sure this is necessary, but just in case...
+ fCTUSActivateTimeSyncCheckBox->setEnabled(1);
+ fCTUSActivateTimeSyncCheckBox->setChecked(true);
+ disableFusionSequenceSignals = backup; //
+
+ if (disableFusionSequenceSignals) return;
+ emit FusionSequencePropertyUpdated(fCTUSSlider->value(), fCTUSActivateSpaceSyncCheckBox->isChecked(), fCTUSSlider->maximum()+1, fCTUSActivateTimeSyncCheckBox->isChecked());
+}
+
+void vvOverlayPanel::updateFusionSequenceSliderValueFromWindow(int val, bool updateVisualization) {
+ if (fCTUSSlider->value()==val) return;
+
+ disableFusionSequenceSignals = true; //not sure this is necessary, but just in case...
+ fCTUSSlider->setValue(val);
+ disableFusionSequenceSignals = false;
+
+ if (disableFusionSequenceSignals) return;
+ if (updateVisualization) emit FusionSequencePropertyUpdated(fCTUSSlider->value(), fCTUSActivateSpaceSyncCheckBox->isChecked(), fCTUSSlider->maximum()+1, fCTUSActivateTimeSyncCheckBox->isChecked());
+}
+