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

void GuiDisplayControlDialog::readMetricSettingsPage (  )  [private, slot]

read the metric settings page

read the metric settings page.

Definition at line 12892 of file GuiDisplayControlDialog.cxx.

References creatingDialog, GuiNodeAttributeColumnSelectionComboBox::currentIndex(), 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, metricDisplayModeNegativeRadioButton, metricDisplayModePositiveRadioButton, metricFileAutoScalePercentageRadioButton, metricFileAutoScaleRadioButton, metricFileAutoScaleSpecifiedColumnRadioButton, metricFileAutoScaleSpecifiedColumnSelectionComboBox, metricFuncVolumeAutoScaleRadioButton, metricPaletteComboBox, metricShowThresholdedRegionsCheckBox, metricThresholdAverageNegativeDoubleSpinBox, metricThresholdAveragePositiveDoubleSpinBox, metricThresholdColumnNegativeDoubleSpinBox, metricThresholdColumnPositiveDoubleSpinBox, metricThresholdSettingColumnSelectionComboBox, metricThresholdTypeComboBox, metricThresholdUserNegativeDoubleSpinBox, metricThresholdUserPositiveDoubleSpinBox, pageMetricSettings, DisplaySettingsMetric::setAutoScalePercentageNegativeMaximum(), DisplaySettingsMetric::setAutoScalePercentageNegativeMinimum(), DisplaySettingsMetric::setAutoScalePercentagePositiveMaximum(), DisplaySettingsMetric::setAutoScalePercentagePositiveMinimum(), MetricFile::setColumnAverageThresholding(), MetricFile::setColumnThresholding(), DisplaySettingsMetric::setDisplayColorBar(), DisplaySettingsMetric::setDisplayMode(), DisplaySettingsMetric::setInterpolateColors(), DisplaySettingsMetric::setMetricThresholdingType(), DisplaySettingsMetric::setOverlayScaleSpecifiedColumnNumber(), DisplaySettingsMetric::setSelectedOverlayScale(), DisplaySettingsMetric::setSelectedPaletteIndex(), DisplaySettingsMetric::setShowSpecialColorForThresholdedNodes(), DisplaySettingsMetric::setUserScaleMinMax(), DisplaySettingsMetric::setUserThresholdingValues(), and GuiBrainModelOpenGL::updateAllGL().

Referenced by applySelected(), createMetricSettingsPage(), and metricPaletteSelection().

{
   if (creatingDialog) {
      return;
   }
   if (pageMetricSettings == NULL) {
      return;
   }
   DisplaySettingsMetric* dsm = theMainWindow->getBrainSet()->getDisplaySettingsMetric();

   //
   // Get display mode
   //
   if (metricDisplayModePositiveRadioButton->isChecked()) {
      dsm->setDisplayMode(DisplaySettingsMetric::METRIC_DISPLAY_MODE_POSITIVE_ONLY);
   }
   else if (metricDisplayModeNegativeRadioButton->isChecked()) {
      dsm->setDisplayMode(DisplaySettingsMetric::METRIC_DISPLAY_MODE_NEGATIVE_ONLY);
   }
   else {
      dsm->setDisplayMode(DisplaySettingsMetric::METRIC_DISPLAY_MODE_POSITIVE_AND_NEGATIVE);
   }
   
   //
   // Get auto/user scale, pos/neg max, and interpolate color mapping
   //
   if (metricFileAutoScaleRadioButton->isChecked()) {
      dsm->setSelectedOverlayScale(DisplaySettingsMetric::METRIC_OVERLAY_SCALE_AUTO);
   }
   else if (metricFileAutoScalePercentageRadioButton->isChecked()) {
      dsm->setSelectedOverlayScale(DisplaySettingsMetric::METRIC_OVERLAY_SCALE_AUTO_PERCENTAGE);
   }
   else if (metricFileAutoScaleSpecifiedColumnRadioButton->isChecked()) {
      dsm->setSelectedOverlayScale(DisplaySettingsMetric::METRIC_OVERLAY_SCALE_AUTO_SPECIFIED_COLUMN);
   }
   else if (metricFuncVolumeAutoScaleRadioButton->isChecked()) {
      dsm->setSelectedOverlayScale(DisplaySettingsMetric::METRIC_OVERLAY_SCALE_AUTO_FUNC_VOLUME);
   }
   else {
      dsm->setSelectedOverlayScale(DisplaySettingsMetric::METRIC_OVERLAY_SCALE_USER);
   }
   dsm->setOverlayScaleSpecifiedColumnNumber(metricFileAutoScaleSpecifiedColumnSelectionComboBox->currentIndex());
   
   dsm->setUserScaleMinMax(metricColorPositiveMinDoubleSpinBox->value(),
                           metricColorPositiveMaxDoubleSpinBox->value(),
                           metricColorNegativeMinDoubleSpinBox->value(),
                           metricColorNegativeMaxDoubleSpinBox->value());

   dsm->setAutoScalePercentageNegativeMinimum(
           metricColorPercentageNegativeMinDoubleSpinBox->value());
   dsm->setAutoScalePercentageNegativeMaximum(
           metricColorPercentageNegativeMaxDoubleSpinBox->value());
   dsm->setAutoScalePercentagePositiveMinimum(
           metricColorPercentagePositiveMinDoubleSpinBox->value());
   dsm->setAutoScalePercentagePositiveMaximum(
           metricColorPercentagePositiveMaxDoubleSpinBox->value());

   dsm->setInterpolateColors(metricColorInterpolateCheckBox->isChecked());
                           
   //
   // Get negative and positive threshold
   //
   dsm->setShowSpecialColorForThresholdedNodes(metricShowThresholdedRegionsCheckBox->isChecked());
   
   //
   // Get palette index and display color bar flag
   //
   dsm->setSelectedPaletteIndex(metricPaletteComboBox->currentIndex());
   dsm->setDisplayColorBar(metricDisplayColorBarCheckBox->isChecked());

   MetricFile* mf = theMainWindow->getBrainSet()->getMetricFile();
   const int threshColumnNumber = metricThresholdSettingColumnSelectionComboBox->currentIndex();
   if ((threshColumnNumber >= 0) &&
       (threshColumnNumber < mf->getNumberOfColumns())) {
      mf->setColumnThresholding(threshColumnNumber,
                                metricThresholdColumnNegativeDoubleSpinBox->value(),
                                metricThresholdColumnPositiveDoubleSpinBox->value());
      mf->setColumnAverageThresholding(threshColumnNumber,
                                metricThresholdAverageNegativeDoubleSpinBox->value(),
                                metricThresholdAveragePositiveDoubleSpinBox->value());
   }
   dsm->setUserThresholdingValues(metricThresholdUserNegativeDoubleSpinBox->value(),
                                  metricThresholdUserPositiveDoubleSpinBox->value());
   dsm->setMetricThresholdingType(
      static_cast<DisplaySettingsMetric::METRIC_THRESHOLDING_TYPE>(
         metricThresholdTypeComboBox->currentIndex()));

   theMainWindow->getBrainSet()->getNodeColoring()->assignColors();
   theMainWindow->getBrainSet()->getVoxelColoring()->setVolumeFunctionalColoringInvalid();
   GuiBrainModelOpenGL::updateAllGL(NULL);   
}


Generated by  Doxygen 1.6.0   Back to index