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

void GuiDisplayControlDialog::createMetricSettingsPage (  )  [private]

create the metric settings page

Page containing metric control.

Definition at line 11980 of file GuiDisplayControlDialog.cxx.

References WuQWidgetGroup::addWidget(), DisplaySettingsMetric::METRIC_OVERLAY_SCALE_AUTO, DisplaySettingsMetric::METRIC_OVERLAY_SCALE_AUTO_FUNC_VOLUME, 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, metricPaletteSelection(), metricShowThresholdedRegionsCheckBox, metricThresholdAverageNegativeDoubleSpinBox, metricThresholdAveragePositiveDoubleSpinBox, metricThresholdColumnNegativeDoubleSpinBox, metricThresholdColumnPositiveDoubleSpinBox, metricThresholdSettingColumnSelectionComboBox, metricThresholdTypeComboBox, metricThresholdUserNegativeDoubleSpinBox, metricThresholdUserPositiveDoubleSpinBox, metricUserScaleRadioButton, pageMetricSettings, pageMetricSettingsWidgetGroup, pageWidgetStack, readMetricSettingsPage(), and slotUpateMetricThresholdSettingValues().

Referenced by showDisplayControlPage().

{
   const int floatSpinBoxWidth = 120;
   
   //
   // Color Mapping
   //
   QButtonGroup* scaleButtonGroup = new QButtonGroup(this);
   QObject::connect(scaleButtonGroup, SIGNAL(buttonClicked(int)),
                    this, SLOT(readMetricSettingsPage()));
   metricFileAutoScaleRadioButton = new QRadioButton("Auto Scale");
   metricFileAutoScaleRadioButton->setToolTip(
                 "This selection will map the most negative\n"
                 "and positive values in the view metric to \n"
                 "the -1.0 and 1.0 values in the selected \n"
                 "palette.  If you are displaying multiple \n"
                 "metrics on a surface, identical colors will \n"
                 "not represent identical values in the \n"
                 "multiple metrics displayed.  For identical \n"
                 "colors to represent identical values in \n"
                 "different metrics, switch to \"Auto Scale - \n"
                 "Metric Column\".");
   scaleButtonGroup->addButton(metricFileAutoScaleRadioButton, 
                               DisplaySettingsMetric::METRIC_OVERLAY_SCALE_AUTO);

   metricFileAutoScalePercentageRadioButton = new QRadioButton("Auto Scale - Percentage");
   metricFileAutoScalePercentageRadioButton->setToolTip("");
   scaleButtonGroup->addButton(metricFileAutoScalePercentageRadioButton);

   metricFileAutoScaleSpecifiedColumnRadioButton = new QRadioButton("Auto Scale - Metric Column");
   metricFileAutoScaleSpecifiedColumnRadioButton->setToolTip(
                 "This selection will map the most negative\n"
                 "and positive values in the selected metric\n"
                 "column to the -1.0 and 1.0 values in the\n"
                 "selected palette.  If multiple metrics are \n"
                 "displayed, identical colors represent \n"
                 "identical values.");
   scaleButtonGroup->addButton(metricFileAutoScaleSpecifiedColumnRadioButton, 
                               DisplaySettingsMetric::METRIC_OVERLAY_SCALE_AUTO_SPECIFIED_COLUMN);
   metricFileAutoScaleSpecifiedColumnSelectionComboBox = 
      new GuiNodeAttributeColumnSelectionComboBox(GUI_NODE_FILE_TYPE_METRIC,
                                                  false,
                                                  false,
                                                  false);
   QObject::connect(metricFileAutoScaleSpecifiedColumnSelectionComboBox, SIGNAL(itemSelected(int)),
                    this, SLOT(readMetricSettingsPage()));
                                                  
   metricFuncVolumeAutoScaleRadioButton = new QRadioButton("Auto Scale - Functional Volume");
   metricFuncVolumeAutoScaleRadioButton->setToolTip(
                 "This selection will map the most negative\n"
                 "and positive values in the selected functional\n"
                 "volume to the -1.0 and 1.0 values in the\n"
                 "selected palette.");
   scaleButtonGroup->addButton(metricFuncVolumeAutoScaleRadioButton, 
                               DisplaySettingsMetric::METRIC_OVERLAY_SCALE_AUTO_FUNC_VOLUME);

   metricUserScaleRadioButton = new QRadioButton("User Scale");
   metricUserScaleRadioButton->setToolTip(
                 "This selection will map the Pos Max value\n"
                 "to the 1.0 value in the palette, the Pos\n"
                 "Min value to the 0.0 value in the palettte,\n"
                 "the Neg Min value to the 0.0 value in the \n"
                 "palette, and the Neg Max value to the -1.0\n"
                 "value in the palette.");
   scaleButtonGroup->addButton(metricUserScaleRadioButton, 
                               DisplaySettingsMetric::METRIC_OVERLAY_SCALE_USER);
   
   QLabel* colorMapPosMinMaxLabel = new QLabel("Pos Min/Max");
   metricColorPositiveMaxDoubleSpinBox = new QDoubleSpinBox;
   metricColorPositiveMaxDoubleSpinBox->setMinimum(0);
   metricColorPositiveMaxDoubleSpinBox->setMaximum(10000000.0);
   metricColorPositiveMaxDoubleSpinBox->setSingleStep(1.0);
   metricColorPositiveMaxDoubleSpinBox->setDecimals(6);
   metricColorPositiveMaxDoubleSpinBox->setToolTip(
                 "This positive metric value is mapped to\n"
                 "the 1.0 value in the color palette.");
   QObject::connect(metricColorPositiveMaxDoubleSpinBox, SIGNAL(valueChanged(double)),
                    this, SLOT(readMetricSettingsPage()));
                    
   metricColorPositiveMinDoubleSpinBox = new QDoubleSpinBox;
   metricColorPositiveMinDoubleSpinBox->setMinimum(0);
   metricColorPositiveMinDoubleSpinBox->setMaximum(10000000.0);
   metricColorPositiveMinDoubleSpinBox->setSingleStep(1.0);
   metricColorPositiveMinDoubleSpinBox->setDecimals(6);
   metricColorPositiveMinDoubleSpinBox->setToolTip(
                 "This positive metric value is mapped to\n"
                 "the 0.0 value in the color palette.");
   QObject::connect(metricColorPositiveMinDoubleSpinBox, SIGNAL(valueChanged(double)),
                    this, SLOT(readMetricSettingsPage()));
   
   QLabel* colorMapNegMinMaxLabel = new QLabel("Neg Max/Min");
   metricColorNegativeMinDoubleSpinBox = new QDoubleSpinBox;
   metricColorNegativeMinDoubleSpinBox->setMinimum(-10000000.0);
   metricColorNegativeMinDoubleSpinBox->setMaximum(0.0);
   metricColorNegativeMinDoubleSpinBox->setSingleStep(1.0);
   metricColorNegativeMinDoubleSpinBox->setDecimals(6);
   metricColorNegativeMinDoubleSpinBox->setToolTip(
                 "This negative metric value is mapped to\n"
                 "the 0.0 value in the color palette.");
   QObject::connect(metricColorNegativeMinDoubleSpinBox, SIGNAL(valueChanged(double)),
                    this, SLOT(readMetricSettingsPage()));
   
   metricColorNegativeMaxDoubleSpinBox = new QDoubleSpinBox;
   metricColorNegativeMaxDoubleSpinBox->setMinimum(-10000000.0);
   metricColorNegativeMaxDoubleSpinBox->setMaximum(0.0);
   metricColorNegativeMaxDoubleSpinBox->setSingleStep(1.0);
   metricColorNegativeMaxDoubleSpinBox->setDecimals(6);
   metricColorNegativeMaxDoubleSpinBox->setToolTip(
                 "This negative metric value is mapped to\n"
                 "the -1.0 value in the color palette.");
   QObject::connect(metricColorNegativeMaxDoubleSpinBox, SIGNAL(valueChanged(double)),
                    this, SLOT(readMetricSettingsPage()));
                    
   metricColorInterpolateCheckBox = new QCheckBox("Interpolate");
   QObject::connect(metricColorInterpolateCheckBox, SIGNAL(clicked()),
                    this, SLOT(readMetricSettingsPage()));
   
   QGridLayout* colorMapGridLayout = new QGridLayout;
   colorMapGridLayout->setColumnMinimumWidth(0, 25);
   colorMapGridLayout->setContentsMargins(0, 0, 0, 0);
   colorMapGridLayout->addWidget(colorMapPosMinMaxLabel, 0, 1);
   colorMapGridLayout->addWidget(metricColorPositiveMinDoubleSpinBox, 0, 2);
   colorMapGridLayout->addWidget(metricColorPositiveMaxDoubleSpinBox, 0, 3);
   colorMapGridLayout->addWidget(colorMapNegMinMaxLabel, 1, 1);
   colorMapGridLayout->addWidget(metricColorNegativeMaxDoubleSpinBox, 1, 2);
   colorMapGridLayout->addWidget(metricColorNegativeMinDoubleSpinBox, 1, 3);

   QLabel* colorMapPercentagePosMinMaxLabel = new QLabel("Pos Min/Max");
   metricColorPercentagePositiveMaxDoubleSpinBox = new QDoubleSpinBox;
   metricColorPercentagePositiveMaxDoubleSpinBox->setMinimum(0);
   metricColorPercentagePositiveMaxDoubleSpinBox->setMaximum(100.0);
   metricColorPercentagePositiveMaxDoubleSpinBox->setSingleStep(1.0);
   metricColorPercentagePositiveMaxDoubleSpinBox->setDecimals(0);
   metricColorPercentagePositiveMaxDoubleSpinBox->setSuffix("%");
   metricColorPercentagePositiveMaxDoubleSpinBox->setToolTip(
                 "This positive percentile metric value is mapped to\n"
                 "the 1.0 value in the color palette.");
   QObject::connect(metricColorPercentagePositiveMaxDoubleSpinBox, SIGNAL(valueChanged(double)),
                    this, SLOT(readMetricSettingsPage()));

   metricColorPercentagePositiveMinDoubleSpinBox = new QDoubleSpinBox;
   metricColorPercentagePositiveMinDoubleSpinBox->setMinimum(0);
   metricColorPercentagePositiveMinDoubleSpinBox->setMaximum(100.0);
   metricColorPercentagePositiveMinDoubleSpinBox->setSingleStep(1.0);
   metricColorPercentagePositiveMinDoubleSpinBox->setDecimals(0);
   metricColorPercentagePositiveMinDoubleSpinBox->setSuffix("%");
   metricColorPercentagePositiveMinDoubleSpinBox->setToolTip(
                 "This positive percentile metric value is mapped to\n"
                 "the 0.0 value in the color palette.");
   QObject::connect(metricColorPercentagePositiveMinDoubleSpinBox, SIGNAL(valueChanged(double)),
                    this, SLOT(readMetricSettingsPage()));

   QLabel* colorMapPercentageNegMinMaxLabel = new QLabel("Neg Max/Min");
   metricColorPercentageNegativeMinDoubleSpinBox = new QDoubleSpinBox;
   metricColorPercentageNegativeMinDoubleSpinBox->setMinimum(0.0);
   metricColorPercentageNegativeMinDoubleSpinBox->setMaximum(100.0);
   metricColorPercentageNegativeMinDoubleSpinBox->setSingleStep(1.0);
   metricColorPercentageNegativeMinDoubleSpinBox->setDecimals(0);
   metricColorPercentageNegativeMinDoubleSpinBox->setSuffix("%");
   metricColorPercentageNegativeMinDoubleSpinBox->setToolTip(
                 "This negative percentile metric value is mapped to\n"
                 "the 0.0 value in the color palette.");
   QObject::connect(metricColorPercentageNegativeMinDoubleSpinBox, SIGNAL(valueChanged(double)),
                    this, SLOT(readMetricSettingsPage()));

   metricColorPercentageNegativeMaxDoubleSpinBox = new QDoubleSpinBox;
   metricColorPercentageNegativeMaxDoubleSpinBox->setMinimum(0);
   metricColorPercentageNegativeMaxDoubleSpinBox->setMaximum(100.0);
   metricColorPercentageNegativeMaxDoubleSpinBox->setSingleStep(1.0);
   metricColorPercentageNegativeMaxDoubleSpinBox->setDecimals(0);
   metricColorPercentageNegativeMaxDoubleSpinBox->setSuffix("%");
   metricColorPercentageNegativeMaxDoubleSpinBox->setToolTip(
                 "This negative percentile metric value is mapped to\n"
                 "the -1.0 value in the color palette.");
   QObject::connect(metricColorPercentageNegativeMaxDoubleSpinBox, SIGNAL(valueChanged(double)),
                    this, SLOT(readMetricSettingsPage()));

   QWidget* colorMapPercentageWidget = new QWidget;
   QGridLayout* colorMapPercentageGridLayout = new QGridLayout(colorMapPercentageWidget);
   colorMapPercentageGridLayout->setContentsMargins(0, 0, 0, 0);
   colorMapPercentageGridLayout->setColumnMinimumWidth(0, 25);
   colorMapPercentageGridLayout->addWidget(colorMapPercentagePosMinMaxLabel, 0, 1);
   colorMapPercentageGridLayout->addWidget(metricColorPercentagePositiveMinDoubleSpinBox, 0, 2);
   colorMapPercentageGridLayout->addWidget(metricColorPercentagePositiveMaxDoubleSpinBox, 0, 3);
   colorMapPercentageGridLayout->addWidget(colorMapPercentageNegMinMaxLabel, 1, 1);
   colorMapPercentageGridLayout->addWidget(metricColorPercentageNegativeMaxDoubleSpinBox, 1, 2);
   colorMapPercentageGridLayout->addWidget(metricColorPercentageNegativeMinDoubleSpinBox, 1, 3);
   colorMapPercentageWidget->setFixedSize(colorMapPercentageWidget->sizeHint());
   
   QGridLayout* colorScaleGridLayout = new QGridLayout;
   colorScaleGridLayout->addWidget(metricFileAutoScaleRadioButton, 0, 0, 1, 2);
   colorScaleGridLayout->addWidget(metricFileAutoScalePercentageRadioButton, 1, 0, 1, 1);
   colorScaleGridLayout->addWidget(colorMapPercentageWidget, 2, 0, 1, 2);
   colorScaleGridLayout->addWidget(metricFileAutoScaleSpecifiedColumnRadioButton, 3, 0, 1, 1);
   colorScaleGridLayout->addWidget(metricFileAutoScaleSpecifiedColumnSelectionComboBox, 3, 1);
   colorScaleGridLayout->addWidget(metricFuncVolumeAutoScaleRadioButton, 4, 0, 1, 2);
   colorScaleGridLayout->addWidget(metricUserScaleRadioButton, 5, 0, 1, 2);

   QGroupBox* colorGroupBox = new QGroupBox("Color Mapping");
   QVBoxLayout* colorGroupLayout = new QVBoxLayout(colorGroupBox);
   colorGroupLayout->addLayout(colorScaleGridLayout);
   colorGroupLayout->setAlignment(colorScaleGridLayout, Qt::AlignLeft);
   colorGroupLayout->addLayout(colorMapGridLayout);
   colorGroupLayout->setAlignment(colorMapGridLayout, Qt::AlignLeft);
   colorGroupLayout->addWidget(metricColorInterpolateCheckBox);
   colorGroupLayout->setAlignment(metricColorInterpolateCheckBox, Qt::AlignLeft);
   //colorGroupBox->setFixedSize(colorGroupBox->sizeHint());
   
   //
   // Display Mode Buttons
   //
   metricDisplayModeBothRadioButton     = new QRadioButton("Both");
   metricDisplayModePositiveRadioButton = new QRadioButton("Positive");
   metricDisplayModeNegativeRadioButton = new QRadioButton("Negative");
   
   QButtonGroup* displayModeButtonGroup = new QButtonGroup(this);
   QObject::connect(displayModeButtonGroup, SIGNAL(buttonClicked(int)),
                    this, SLOT(readMetricSettingsPage()));
   displayModeButtonGroup->addButton(metricDisplayModeBothRadioButton, DisplaySettingsMetric::METRIC_DISPLAY_MODE_POSITIVE_AND_NEGATIVE);
   displayModeButtonGroup->addButton(metricDisplayModePositiveRadioButton, DisplaySettingsMetric::METRIC_DISPLAY_MODE_POSITIVE_ONLY);
   displayModeButtonGroup->addButton(metricDisplayModeNegativeRadioButton, DisplaySettingsMetric::METRIC_DISPLAY_MODE_NEGATIVE_ONLY);

   QGroupBox* displayModeGroupBox = new QGroupBox("Display Mode");
   QVBoxLayout* displayModeGroupLayout = new QVBoxLayout(displayModeGroupBox);
   displayModeGroupLayout->addWidget(metricDisplayModePositiveRadioButton);
   displayModeGroupLayout->addWidget(metricDisplayModeNegativeRadioButton);
   displayModeGroupLayout->addWidget(metricDisplayModeBothRadioButton);
   displayModeGroupBox->setFixedSize(displayModeGroupBox->sizeHint());
   
   //
   // Palette Selection
   //
   metricPaletteComboBox = new QComboBox;
   QObject::connect(metricPaletteComboBox, SIGNAL(activated(int)),
                    this, SLOT(metricPaletteSelection(int)));
   metricDisplayColorBarCheckBox = new QCheckBox("Display Color Bar");
   QObject::connect(metricDisplayColorBarCheckBox, SIGNAL(clicked()),
                    this, SLOT(readMetricSettingsPage()));
   QGroupBox* paletteGroupBox = new QGroupBox("Palette");
   QVBoxLayout* paletteLayout = new QVBoxLayout(paletteGroupBox);
   paletteLayout->addWidget(metricPaletteComboBox);
   paletteLayout->addWidget(metricDisplayColorBarCheckBox);
   paletteGroupBox->setFixedHeight(paletteGroupBox->sizeHint().height());
   
   //
   // Threshold line edits
   //
   QLabel* threshColLabel = new QLabel("Column");
   QLabel* threshAvgAreaLabel = new QLabel("Average Area");
   QLabel* threshUserLabel = new QLabel("User");
   QLabel* threshPosLabel = new QLabel("Pos");
   QLabel* threshNegLabel = new QLabel("Neg");
   metricThresholdColumnPositiveDoubleSpinBox = new QDoubleSpinBox;
   metricThresholdColumnPositiveDoubleSpinBox->setMinimum(-10000000.0);
   metricThresholdColumnPositiveDoubleSpinBox->setMaximum( 10000000.0);
   metricThresholdColumnPositiveDoubleSpinBox->setSingleStep(1.0);
   metricThresholdColumnPositiveDoubleSpinBox->setDecimals(6);
   metricThresholdColumnPositiveDoubleSpinBox->setMaximumWidth(floatSpinBoxWidth);
   metricThresholdColumnPositiveDoubleSpinBox->setToolTip(
                 "Positive metric values less positive\n"
                 "than this amount are not shown when\n"
                 "threshold type COLUMN is selected. This\n"
                 "value comes from and is stored in the\n"
                 "metric file.");
   QObject::connect(metricThresholdColumnPositiveDoubleSpinBox, SIGNAL(valueChanged(double)),
                    this, SLOT(readMetricSettingsPage()));
                    
   metricThresholdAveragePositiveDoubleSpinBox = new QDoubleSpinBox;
   metricThresholdAveragePositiveDoubleSpinBox->setMinimum(-10000000.0);
   metricThresholdAveragePositiveDoubleSpinBox->setMaximum( 10000000.0);
   metricThresholdAveragePositiveDoubleSpinBox->setSingleStep(1.0);
   metricThresholdAveragePositiveDoubleSpinBox->setDecimals(6);
   metricThresholdAveragePositiveDoubleSpinBox->setMaximumWidth(floatSpinBoxWidth);
   metricThresholdAveragePositiveDoubleSpinBox->setToolTip(
                 "Positive metric values less positive\n"
                 "than this amount are not shown when\n"
                 "threshold type AVERAGE AREA is selected.\n"
                 "This value comes from and is stored in the\n"
                 "the metric file.");
   QObject::connect(metricThresholdAveragePositiveDoubleSpinBox, SIGNAL(valueChanged(double)),
                    this, SLOT(readMetricSettingsPage()));
                    
   metricThresholdUserPositiveDoubleSpinBox = new QDoubleSpinBox;
   metricThresholdUserPositiveDoubleSpinBox->setMinimum(-10000000.0);
   metricThresholdUserPositiveDoubleSpinBox->setMaximum( 10000000.0);
   metricThresholdUserPositiveDoubleSpinBox->setSingleStep(0.05);
   metricThresholdUserPositiveDoubleSpinBox->setDecimals(6);
   metricThresholdUserPositiveDoubleSpinBox->setMaximumWidth(floatSpinBoxWidth);
   metricThresholdUserPositiveDoubleSpinBox->setToolTip(
                 "Positive metric values less positive\n"
                 "than this amount are not shown when\n"
                 "threshold type USER is selected.");
   QObject::connect(metricThresholdUserPositiveDoubleSpinBox, SIGNAL(valueChanged(double)),
                    this, SLOT(readMetricSettingsPage()));
                    
   metricThresholdColumnNegativeDoubleSpinBox = new QDoubleSpinBox;
   metricThresholdColumnNegativeDoubleSpinBox->setMinimum(-10000000.0);
   metricThresholdColumnNegativeDoubleSpinBox->setMaximum( 10000000.0);
   metricThresholdColumnNegativeDoubleSpinBox->setSingleStep(1.0);
   metricThresholdColumnNegativeDoubleSpinBox->setDecimals(6);
   metricThresholdColumnNegativeDoubleSpinBox->setMaximumWidth(floatSpinBoxWidth);
   metricThresholdColumnNegativeDoubleSpinBox->setToolTip(
                 "Negative metric values less negative\n"
                 "than this amount are not shown when\n"
                 "threshold type COLUMN is selected. This\n"
                 "value comes from and is stored in the\n"
                 "metric file.");
   QObject::connect(metricThresholdColumnNegativeDoubleSpinBox, SIGNAL(valueChanged(double)),
                    this, SLOT(readMetricSettingsPage()));
                    
   metricThresholdAverageNegativeDoubleSpinBox = new QDoubleSpinBox;
   metricThresholdAverageNegativeDoubleSpinBox->setMinimum(-10000000.0);
   metricThresholdAverageNegativeDoubleSpinBox->setMaximum( 10000000.0);
   metricThresholdAverageNegativeDoubleSpinBox->setSingleStep(1.0);
   metricThresholdAverageNegativeDoubleSpinBox->setDecimals(6);
   metricThresholdAverageNegativeDoubleSpinBox->setMaximumWidth(floatSpinBoxWidth);
   metricThresholdAverageNegativeDoubleSpinBox->setToolTip(
                 "Negative metric values less negative\n"
                 "than this amount are not shown when\n"
                 "threshold type AVERAGE AREA is selected.\n"
                 "This value comes from and is stored in\n"
                 "the metric file.");
   QObject::connect(metricThresholdAverageNegativeDoubleSpinBox, SIGNAL(valueChanged(double)),
                    this, SLOT(readMetricSettingsPage()));
                    
   metricThresholdUserNegativeDoubleSpinBox = new QDoubleSpinBox;
   metricThresholdUserNegativeDoubleSpinBox->setMinimum(-10000000.0);
   metricThresholdUserNegativeDoubleSpinBox->setMaximum( 10000000.0);
   metricThresholdUserNegativeDoubleSpinBox->setSingleStep(0.05);
   metricThresholdUserNegativeDoubleSpinBox->setDecimals(6);
   metricThresholdUserNegativeDoubleSpinBox->setMaximumWidth(floatSpinBoxWidth);
   metricThresholdUserNegativeDoubleSpinBox->setToolTip(
                 "Negative metric values less negative\n"
                 "than this amount are not shown when\n"
                 "threshold type USER is selected.");
   QObject::connect(metricThresholdUserNegativeDoubleSpinBox, SIGNAL(valueChanged(double)),
                    this, SLOT(readMetricSettingsPage()));
                    
   metricShowThresholdedRegionsCheckBox = new QCheckBox("Show Subthresh Region Green");
   metricShowThresholdedRegionsCheckBox->setToolTip(
                 "When checked, nodes/voxels that fail\n"
                 "the threshold test are colored in green.\n"
                 "Nodes/voxels with zero values are not\n"
                 "colored.");
   QObject::connect(metricShowThresholdedRegionsCheckBox, SIGNAL(toggled(bool)),
                    this, SLOT(readMetricSettingsPage()));
      
   QLabel* threshTypeLabel = new QLabel("Threshold Type ");
   metricThresholdTypeComboBox = new QComboBox;
   QObject::connect(metricThresholdTypeComboBox, SIGNAL(activated(int)),
                    this, SLOT(readMetricSettingsPage()));
   metricThresholdTypeComboBox->insertItem(DisplaySettingsMetric::METRIC_THRESHOLDING_TYPE_FILE_COLUMN,
                                           "Column");
   metricThresholdTypeComboBox->insertItem(DisplaySettingsMetric::METRIC_THRESHOLDING_TYPE_FILE_COLUMN_AVERAGE,
                                           "Average Area");
   metricThresholdTypeComboBox->insertItem(DisplaySettingsMetric::METRIC_THRESHOLDING_TYPE_USER_VALUES,
                                           "User");

   QLabel* threshColumnLabel = new QLabel("Column ");
   metricThresholdSettingColumnSelectionComboBox = 
      new GuiNodeAttributeColumnSelectionComboBox(GUI_NODE_FILE_TYPE_METRIC,
                                                  false,
                                                  false,
                                                  false);
   QObject::connect(metricThresholdSettingColumnSelectionComboBox, SIGNAL(activated(int)),
                    this, SLOT(slotUpateMetricThresholdSettingValues()));
   QHBoxLayout* threshColumnLayout = new QHBoxLayout;
   threshColumnLayout->addWidget(threshColumnLabel);
   threshColumnLayout->addWidget(metricThresholdSettingColumnSelectionComboBox);
   threshColumnLayout->addStretch();
   QGridLayout* threshLayout = new QGridLayout;
   threshLayout->addWidget(threshColLabel, 0, 1);
   threshLayout->addWidget(threshAvgAreaLabel, 0, 2);
   threshLayout->addWidget(threshUserLabel, 0, 3);
   threshLayout->addWidget(threshPosLabel, 1, 0);
   threshLayout->addWidget(metricThresholdColumnPositiveDoubleSpinBox, 1, 1);
   threshLayout->addWidget(metricThresholdAveragePositiveDoubleSpinBox, 1, 2);
   threshLayout->addWidget(metricThresholdUserPositiveDoubleSpinBox, 1, 3);
   threshLayout->addWidget(threshNegLabel, 2, 0);
   threshLayout->addWidget(metricThresholdColumnNegativeDoubleSpinBox, 2, 1);
   threshLayout->addWidget(metricThresholdAverageNegativeDoubleSpinBox, 2, 2);
   threshLayout->addWidget(metricThresholdUserNegativeDoubleSpinBox, 2, 3);
   QHBoxLayout* threshTypeLayout = new QHBoxLayout;
   threshTypeLayout->addWidget(threshTypeLabel);
   threshTypeLayout->addWidget(metricThresholdTypeComboBox);
   threshTypeLayout->addWidget(new QLabel("  "));
   threshTypeLayout->addWidget(metricShowThresholdedRegionsCheckBox);
   threshTypeLayout->addStretch();
   QGroupBox* thresholdGroupBox = new QGroupBox("Threshold Adjustment");
   QVBoxLayout* thresholdGroupLayout = new QVBoxLayout(thresholdGroupBox);
   thresholdGroupLayout->addLayout(threshColumnLayout);
   thresholdGroupLayout->addLayout(threshTypeLayout);
   thresholdGroupLayout->addLayout(threshLayout);
   thresholdGroupLayout->setAlignment(threshColumnLayout, Qt::AlignLeft);
   thresholdGroupLayout->setAlignment(threshTypeLayout, Qt::AlignLeft);
   thresholdGroupLayout->setAlignment(threshLayout, Qt::AlignLeft);
   thresholdGroupBox->setFixedSize(thresholdGroupBox->sizeHint());
   
   //
   // Metric page and all layouts
   //
   QHBoxLayout* displayModePaletteLayout = new QHBoxLayout;
   displayModePaletteLayout->addWidget(displayModeGroupBox);
   displayModePaletteLayout->addWidget(paletteGroupBox);
   displayModePaletteLayout->addStretch();
   
   pageMetricSettings = new QWidget;
   QVBoxLayout* metricLayout = new QVBoxLayout(pageMetricSettings);
   metricLayout->addWidget(colorGroupBox);
   metricLayout->addLayout(displayModePaletteLayout);
   metricLayout->addWidget(thresholdGroupBox);
   metricLayout->addStretch();
   //pageMetricSettings->setFixedSize(pageMetricSettings->sizeHint());

   pageWidgetStack->addWidget(pageMetricSettings);
   
   pageMetricSettingsWidgetGroup = new WuQWidgetGroup(this);
   pageMetricSettingsWidgetGroup->addWidget(threshColumnLabel);
   pageMetricSettingsWidgetGroup->addWidget(metricThresholdSettingColumnSelectionComboBox);
   pageMetricSettingsWidgetGroup->addWidget(metricFileAutoScaleRadioButton);
   pageMetricSettingsWidgetGroup->addWidget(metricFileAutoScalePercentageRadioButton);
   pageMetricSettingsWidgetGroup->addWidget(metricColorPercentagePositiveMaxDoubleSpinBox);
   pageMetricSettingsWidgetGroup->addWidget(metricColorPercentagePositiveMinDoubleSpinBox);
   pageMetricSettingsWidgetGroup->addWidget(metricColorPercentageNegativeMaxDoubleSpinBox);
   pageMetricSettingsWidgetGroup->addWidget(metricColorPercentageNegativeMinDoubleSpinBox);
   pageMetricSettingsWidgetGroup->addWidget(metricFileAutoScaleSpecifiedColumnRadioButton);
   pageMetricSettingsWidgetGroup->addWidget(metricFileAutoScaleSpecifiedColumnSelectionComboBox);
   pageMetricSettingsWidgetGroup->addWidget(metricFuncVolumeAutoScaleRadioButton);
   pageMetricSettingsWidgetGroup->addWidget(metricUserScaleRadioButton);
   pageMetricSettingsWidgetGroup->addWidget(metricColorPositiveMaxDoubleSpinBox);
   pageMetricSettingsWidgetGroup->addWidget(metricColorPositiveMinDoubleSpinBox);
   pageMetricSettingsWidgetGroup->addWidget(metricColorNegativeMinDoubleSpinBox);
   pageMetricSettingsWidgetGroup->addWidget(metricColorNegativeMaxDoubleSpinBox);
   pageMetricSettingsWidgetGroup->addWidget(metricColorInterpolateCheckBox);
   pageMetricSettingsWidgetGroup->addWidget(metricDisplayModeBothRadioButton);
   pageMetricSettingsWidgetGroup->addWidget(metricDisplayModePositiveRadioButton);
   pageMetricSettingsWidgetGroup->addWidget(metricDisplayModeNegativeRadioButton);
   pageMetricSettingsWidgetGroup->addWidget(metricPaletteComboBox);
   pageMetricSettingsWidgetGroup->addWidget(metricDisplayColorBarCheckBox);
   pageMetricSettingsWidgetGroup->addWidget(metricThresholdColumnPositiveDoubleSpinBox);
   pageMetricSettingsWidgetGroup->addWidget(metricThresholdAveragePositiveDoubleSpinBox);
   pageMetricSettingsWidgetGroup->addWidget(metricThresholdUserPositiveDoubleSpinBox);
   pageMetricSettingsWidgetGroup->addWidget(metricThresholdColumnNegativeDoubleSpinBox);
   pageMetricSettingsWidgetGroup->addWidget(metricThresholdAverageNegativeDoubleSpinBox);
   pageMetricSettingsWidgetGroup->addWidget(metricThresholdUserNegativeDoubleSpinBox);
   pageMetricSettingsWidgetGroup->addWidget(metricShowThresholdedRegionsCheckBox);
   pageMetricSettingsWidgetGroup->addWidget(metricThresholdTypeComboBox);
}  


Generated by  Doxygen 1.6.0   Back to index