Logo Search packages:      
Sourcecode: caret version File versions  Download package

void GuiDisplayControlDialog::updateMetricSettingsPage (  ) 

update the metric settings page

update the metric settings page.

Definition at line 12726 of file GuiDisplayControlDialog.cxx.

References WuQWidgetGroup::blockSignals(), DisplaySettingsMetric::getAutoScalePercentageNegativeMaximum(), DisplaySettingsMetric::getAutoScalePercentageNegativeMinimum(), DisplaySettingsMetric::getAutoScalePercentagePositiveMaximum(), DisplaySettingsMetric::getAutoScalePercentagePositiveMinimum(), DisplaySettingsMetric::getDisplayColorBar(), DisplaySettingsMetric::getDisplayMode(), DisplaySettingsMetric::getInterpolateColors(), DisplaySettingsMetric::getMetricThresholdingType(), Palette::getName(), GiftiNodeDataFile::getNumberOfColumns(), PaletteFile::getNumberOfPalettes(), DisplaySettingsMetric::getOverlayScaleSpecifiedColumnNumber(), PaletteFile::getPalette(), Palette::getPositiveOnly(), DisplaySettingsMetric::getSelectedOverlayScale(), DisplaySettingsMetric::getSelectedPaletteIndex(), DisplaySettingsMetric::getShowSpecialColorForThresholdedNodes(), DisplaySettingsMetric::getUserScaleMinMax(), DisplaySettingsMetric::getUserThresholdingValues(), DisplaySettingsMetric::METRIC_OVERLAY_SCALE_AUTO, DisplaySettingsMetric::METRIC_OVERLAY_SCALE_AUTO_FUNC_VOLUME, DisplaySettingsMetric::METRIC_OVERLAY_SCALE_AUTO_PERCENTAGE, DisplaySettingsMetric::METRIC_OVERLAY_SCALE_AUTO_SPECIFIED_COLUMN, DisplaySettingsMetric::METRIC_OVERLAY_SCALE_USER, metricColorInterpolateCheckBox, metricColorNegativeMaxDoubleSpinBox, metricColorNegativeMinDoubleSpinBox, metricColorPercentageNegativeMaxDoubleSpinBox, metricColorPercentageNegativeMinDoubleSpinBox, metricColorPercentagePositiveMaxDoubleSpinBox, metricColorPercentagePositiveMinDoubleSpinBox, metricColorPositiveMaxDoubleSpinBox, metricColorPositiveMinDoubleSpinBox, metricDisplayColorBarCheckBox, metricDisplayModeBothRadioButton, metricDisplayModeNegativeRadioButton, metricDisplayModePositiveRadioButton, metricFileAutoScalePercentageRadioButton, metricFileAutoScaleRadioButton, metricFileAutoScaleSpecifiedColumnRadioButton, metricFileAutoScaleSpecifiedColumnSelectionComboBox, metricFuncVolumeAutoScaleRadioButton, metricPaletteComboBox, metricShowThresholdedRegionsCheckBox, metricThresholdSettingColumnSelectionComboBox, metricThresholdTypeComboBox, metricThresholdUserNegativeDoubleSpinBox, metricThresholdUserPositiveDoubleSpinBox, metricUserScaleRadioButton, pageMetricSettings, pageMetricSettingsWidgetGroup, GuiNodeAttributeColumnSelectionComboBox::setCurrentIndex(), slotUpateMetricThresholdSettingValues(), GuiNodeAttributeColumnSelectionComboBox::updateComboBox(), and validMetricData.

Referenced by metricPaletteSelection(), showDisplayControlPage(), and updateMetricItems().

{
   if (pageMetricSettings == NULL) {
      return;
   }
   pageMetricSettingsWidgetGroup->blockSignals(true);

   DisplaySettingsMetric* dsm = theMainWindow->getBrainSet()->getDisplaySettingsMetric();
   MetricFile* mf = theMainWindow->getBrainSet()->getMetricFile();
   if (mf->getNumberOfColumns() > 0) {
      metricThresholdSettingColumnSelectionComboBox->updateComboBox();
      
      //
      // Threshold settings
      //
      slotUpateMetricThresholdSettingValues();
   }
   float negThresh, posThresh;
   dsm->getUserThresholdingValues(negThresh, posThresh);
   metricThresholdUserPositiveDoubleSpinBox->setValue(posThresh);
   metricThresholdUserNegativeDoubleSpinBox->setValue(negThresh);
   metricThresholdTypeComboBox->setCurrentIndex(dsm->getMetricThresholdingType());
   
   //
   // Color Mapping auto scale radio buttons, pos/neg max line edits, and interpolate radio button
   //
   switch(dsm->getSelectedOverlayScale()) {
      case DisplaySettingsMetric::METRIC_OVERLAY_SCALE_AUTO:
         metricFileAutoScaleRadioButton->setChecked(true);
         break;
      case DisplaySettingsMetric::METRIC_OVERLAY_SCALE_AUTO_PERCENTAGE:
         metricFileAutoScalePercentageRadioButton->setChecked(true);
         break;
      case DisplaySettingsMetric::METRIC_OVERLAY_SCALE_AUTO_SPECIFIED_COLUMN:
         metricFileAutoScaleSpecifiedColumnRadioButton->setChecked(true);
         break;
      case DisplaySettingsMetric::METRIC_OVERLAY_SCALE_AUTO_FUNC_VOLUME:
         metricFuncVolumeAutoScaleRadioButton->setChecked(true);
         break;
      case DisplaySettingsMetric::METRIC_OVERLAY_SCALE_USER:
         metricUserScaleRadioButton->setChecked(true);
         break;
   }
   
   metricFileAutoScaleSpecifiedColumnSelectionComboBox->updateComboBox();
   metricFileAutoScaleSpecifiedColumnSelectionComboBox->setCurrentIndex(
      dsm->getOverlayScaleSpecifiedColumnNumber());
      
   float posMinMetric = 0.0, posMaxMetric = 0.0, negMinMetric = 0.0, negMaxMetric = 0.0;
   dsm->getUserScaleMinMax(posMinMetric, posMaxMetric, negMinMetric, negMaxMetric);
   metricColorPositiveMinDoubleSpinBox->setValue(posMinMetric);
   metricColorPositiveMaxDoubleSpinBox->setValue(posMaxMetric);
   metricColorNegativeMinDoubleSpinBox->setValue(negMinMetric);
   metricColorNegativeMaxDoubleSpinBox->setValue(negMaxMetric);

   metricColorPercentagePositiveMaxDoubleSpinBox->setValue(
           dsm->getAutoScalePercentagePositiveMaximum());
   metricColorPercentagePositiveMinDoubleSpinBox->setValue(
           dsm->getAutoScalePercentagePositiveMinimum());
   metricColorPercentageNegativeMinDoubleSpinBox->setValue(
           dsm->getAutoScalePercentageNegativeMinimum());
   metricColorPercentageNegativeMaxDoubleSpinBox->setValue(
           dsm->getAutoScalePercentageNegativeMaximum());

   metricColorInterpolateCheckBox->setChecked(dsm->getInterpolateColors());
   
   //
   // Threshold positive and negative
   //
   metricShowThresholdedRegionsCheckBox->setChecked(dsm->getShowSpecialColorForThresholdedNodes());
   
   //
   // Display mode positive, negative, or both
   //
   switch(dsm->getDisplayMode()) {
      case DisplaySettingsMetric::METRIC_DISPLAY_MODE_POSITIVE_ONLY:
         metricDisplayModePositiveRadioButton->setChecked(true);
         break;
      case DisplaySettingsMetric::METRIC_DISPLAY_MODE_NEGATIVE_ONLY:
         metricDisplayModeNegativeRadioButton->setChecked(true);
         break;
      case DisplaySettingsMetric::METRIC_DISPLAY_MODE_POSITIVE_AND_NEGATIVE:
         metricDisplayModeBothRadioButton->setChecked(true);
         break;
   }
   
   //
   // Palette selection and display color bar
   //
   metricDisplayColorBarCheckBox->setChecked(dsm->getDisplayColorBar());
   metricPaletteComboBox->clear();
   PaletteFile* pf = theMainWindow->getBrainSet()->getPaletteFile();
   const int numPalettes = pf->getNumberOfPalettes();
   for (int i = 0; i < numPalettes; i++) {
      const Palette* p = pf->getPalette(i);
      QString name(p->getName());
      if (p->getPositiveOnly()) {
         name.append("+");
      }
      metricPaletteComboBox->addItem(name);
   }
   metricPaletteComboBox->setCurrentIndex(dsm->getSelectedPaletteIndex());

   const bool volumeValid = (theMainWindow->getBrainSet()->getNumberOfVolumeFunctionalFiles() > 0);
   pageMetricSettings->setEnabled(validMetricData | volumeValid);

   pageMetricSettingsWidgetGroup->blockSignals(false);
}


Generated by  Doxygen 1.6.0   Back to index