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

void GuiDisplayControlDialog::updateVolumeSelectionPage (  )  [private]

update volume selection page

update volume selection page.

Definition at line 3265 of file GuiDisplayControlDialog.cxx.

References BrainModelVolumeVoxelColoring::getPrimaryOverlay(), BrainModelVolumeVoxelColoring::getSecondaryOverlay(), DisplaySettingsVolume::getSelectedAnatomyVolume(), DisplaySettingsVolume::getSelectedFunctionalVolumeThreshold(), DisplaySettingsVolume::getSelectedFunctionalVolumeView(), DisplaySettingsVolume::getSelectedPaintVolume(), DisplaySettingsVolume::getSelectedRgbVolume(), DisplaySettingsVolume::getSelectedSegmentationVolume(), DisplaySettingsVolume::getSelectedVectorVolume(), BrainModelVolumeVoxelColoring::getUnderlay(), DisplaySettingsVolume::getVectorVolumeSparsity(), pageVolumeSelection, updateProbAtlasVolumeItems(), updateVolumeToolTips(), validVolumeData, vectorVolumeSparsitySpinBox, volumeAnatomyComboBox, volumeAnatomyInfoPushButton, volumeAnatomyLabel, volumeAnatomyMetaDataPushButton, volumeFunctionalThreshInfoPushButton, volumeFunctionalThreshMetaDataPushButton, volumeFunctionalThresholdComboBox, volumeFunctionalThresholdLabel, volumeFunctionalViewComboBox, volumeFunctionalViewInfoPushButton, volumeFunctionalViewLabel, volumeFunctionalViewMetaDataPushButton, volumePaintComboBox, volumePaintInfoPushButton, volumePaintLabel, volumePaintMetaDataPushButton, volumePrimaryOverlayAnatomyRadioButton, volumePrimaryOverlayFunctionalRadioButton, volumePrimaryOverlayNoneButton, volumePrimaryOverlayPaintRadioButton, volumePrimaryOverlayProbAtlasRadioButton, volumePrimaryOverlayRgbRadioButton, volumePrimaryOverlaySegmentationRadioButton, volumePrimaryOverlayVectorRadioButton, volumeProbAtlasInfoPushButton, volumeProbAtlasLabel, volumeProbAtlasMetaDataPushButton, volumeRgbComboBox, volumeRgbInfoPushButton, volumeRgbLabel, volumeRgbMetaDataPushButton, volumeSecondaryOverlayAnatomyRadioButton, volumeSecondaryOverlayFunctionalRadioButton, volumeSecondaryOverlayNoneButton, volumeSecondaryOverlayPaintRadioButton, volumeSecondaryOverlayProbAtlasRadioButton, volumeSecondaryOverlayRgbRadioButton, volumeSecondaryOverlaySegmentationRadioButton, volumeSecondaryOverlayVectorRadioButton, volumeSegmentationComboBox, volumeSegmentationInfoPushButton, volumeSegmentationLabel, volumeSegmentationMetaDataPushButton, volumeUnderlayAnatomyRadioButton, volumeUnderlayFunctionalRadioButton, volumeUnderlayNoneButton, volumeUnderlayPaintRadioButton, volumeUnderlayProbAtlasRadioButton, volumeUnderlayRgbRadioButton, volumeUnderlaySegmentationRadioButton, volumeUnderlayVectorRadioButton, volumeVectorComboBox, volumeVectorInfoPushButton, volumeVectorLabel, and volumeVectorMetaDataPushButton.

Referenced by showDisplayControlPage(), and updateVolumeItems().

{
   if (pageVolumeSelection == NULL) {
      return;
   }

   pageVolumeSelection->setEnabled(validVolumeData); 
   BrainModelVolumeVoxelColoring* vvc = theMainWindow->getBrainSet()->getVoxelColoring();
   DisplaySettingsVolume* dsv         = theMainWindow->getBrainSet()->getDisplaySettingsVolume();
   //
   // Set the primary overlay radio buttons
   //
   switch(vvc->getPrimaryOverlay()) {
      case BrainModelVolumeVoxelColoring::UNDERLAY_OVERLAY_ANATOMY:
         volumePrimaryOverlayAnatomyRadioButton->setChecked(true);
         break;
      case BrainModelVolumeVoxelColoring::UNDERLAY_OVERLAY_FUNCTIONAL:
         volumePrimaryOverlayFunctionalRadioButton->setChecked(true);
         break;
      case BrainModelVolumeVoxelColoring::UNDERLAY_OVERLAY_PAINT: 
         volumePrimaryOverlayPaintRadioButton->setChecked(true);
         break;
      case BrainModelVolumeVoxelColoring::UNDERLAY_OVERLAY_PROB_ATLAS: 
         volumePrimaryOverlayProbAtlasRadioButton->setChecked(true);
         break;
      case BrainModelVolumeVoxelColoring::UNDERLAY_OVERLAY_RGB:
         volumePrimaryOverlayRgbRadioButton->setChecked(true);
         break;
      case BrainModelVolumeVoxelColoring::UNDERLAY_OVERLAY_SEGMENTATION:
         volumePrimaryOverlaySegmentationRadioButton->setChecked(true);
         break;
      case BrainModelVolumeVoxelColoring::UNDERLAY_OVERLAY_VECTOR:
         volumePrimaryOverlayVectorRadioButton->setChecked(true);
         break;
      case BrainModelVolumeVoxelColoring::UNDERLAY_OVERLAY_NONE:   
         volumePrimaryOverlayNoneButton->setChecked(true);
         break;
   }

   //
   // set the secondary overlay radio buttons
   //
   switch(vvc->getSecondaryOverlay()) {
      case BrainModelVolumeVoxelColoring::UNDERLAY_OVERLAY_ANATOMY:
         volumeSecondaryOverlayAnatomyRadioButton->setChecked(true);
         break;
      case BrainModelVolumeVoxelColoring::UNDERLAY_OVERLAY_FUNCTIONAL:
         volumeSecondaryOverlayFunctionalRadioButton->setChecked(true);
         break;
      case BrainModelVolumeVoxelColoring::UNDERLAY_OVERLAY_PAINT: 
         volumeSecondaryOverlayPaintRadioButton->setChecked(true);
         break;
      case BrainModelVolumeVoxelColoring::UNDERLAY_OVERLAY_PROB_ATLAS: 
         volumeSecondaryOverlayProbAtlasRadioButton->setChecked(true);
         break;
      case BrainModelVolumeVoxelColoring::UNDERLAY_OVERLAY_RGB:
         volumeSecondaryOverlayRgbRadioButton->setChecked(true);
         break;
      case BrainModelVolumeVoxelColoring::UNDERLAY_OVERLAY_SEGMENTATION:
         volumeSecondaryOverlaySegmentationRadioButton->setChecked(true);
         break;
      case BrainModelVolumeVoxelColoring::UNDERLAY_OVERLAY_VECTOR:
         volumeSecondaryOverlayVectorRadioButton->setChecked(true);
         break;
      case BrainModelVolumeVoxelColoring::UNDERLAY_OVERLAY_NONE:   
         volumeSecondaryOverlayNoneButton->setChecked(true);
         break;
   }
   //
   // set the underlay radio buttons
   //
   switch(vvc->getUnderlay()) {
      case BrainModelVolumeVoxelColoring::UNDERLAY_OVERLAY_ANATOMY:
         volumeUnderlayAnatomyRadioButton->setChecked(true);
         break;
      case BrainModelVolumeVoxelColoring::UNDERLAY_OVERLAY_FUNCTIONAL:
         volumeUnderlayFunctionalRadioButton->setChecked(true);
         break;
      case BrainModelVolumeVoxelColoring::UNDERLAY_OVERLAY_PAINT: 
         volumeUnderlayPaintRadioButton->setChecked(true);
         break;
      case BrainModelVolumeVoxelColoring::UNDERLAY_OVERLAY_PROB_ATLAS: 
         volumeUnderlayProbAtlasRadioButton->setChecked(true);
         break;
      case BrainModelVolumeVoxelColoring::UNDERLAY_OVERLAY_RGB:
         volumeUnderlayRgbRadioButton->setChecked(true);
         break;
      case BrainModelVolumeVoxelColoring::UNDERLAY_OVERLAY_SEGMENTATION:
         volumeUnderlaySegmentationRadioButton->setChecked(true);
         break;
      case BrainModelVolumeVoxelColoring::UNDERLAY_OVERLAY_VECTOR:
         volumeUnderlayVectorRadioButton->setChecked(true);
         break;
      case BrainModelVolumeVoxelColoring::UNDERLAY_OVERLAY_NONE:   
         volumeUnderlayNoneButton->setChecked(true);
         break;
   }
   
   //
   // update anatomy volume combo box
   //
   volumePrimaryOverlayAnatomyRadioButton->setEnabled(false);
   volumeSecondaryOverlayAnatomyRadioButton->setEnabled(false);
   volumeUnderlayAnatomyRadioButton->setEnabled(false);
   volumeAnatomyComboBox->setEnabled(false);
   volumeAnatomyLabel->setEnabled(false);
   volumeAnatomyInfoPushButton->setEnabled(false);
   volumeAnatomyMetaDataPushButton->setEnabled(false);
   volumeAnatomyComboBox->clear();
   if (theMainWindow->getBrainSet()->getNumberOfVolumeAnatomyFiles() > 0) {
      for (int i = 0; i < theMainWindow->getBrainSet()->getNumberOfVolumeAnatomyFiles(); i++) {
         volumeAnatomyComboBox->addItem(
            theMainWindow->getBrainSet()->getVolumeAnatomyFile(i)->getDescriptiveLabel());
      }
      volumeAnatomyComboBox->setCurrentIndex(dsv->getSelectedAnatomyVolume());
      
      volumePrimaryOverlayAnatomyRadioButton->setEnabled(true);
      volumeSecondaryOverlayAnatomyRadioButton->setEnabled(true);
      volumeUnderlayAnatomyRadioButton->setEnabled(true);
      volumeAnatomyComboBox->setEnabled(true);
      volumeAnatomyLabel->setEnabled(true);
      volumeAnatomyInfoPushButton->setEnabled(true);
      volumeAnatomyMetaDataPushButton->setEnabled(true);
   }
   
   //
   // update functional volume combo box
   //
   volumePrimaryOverlayFunctionalRadioButton->setEnabled(false);
   volumeSecondaryOverlayFunctionalRadioButton->setEnabled(false);
   volumeUnderlayFunctionalRadioButton->setEnabled(false);
   volumeFunctionalViewComboBox->setEnabled(false);
   volumeFunctionalThresholdComboBox->setEnabled(false);
   volumeFunctionalViewLabel->setEnabled(false);
   volumeFunctionalViewInfoPushButton->setEnabled(false);
   volumeFunctionalThreshInfoPushButton->setEnabled(false);
   volumeFunctionalViewMetaDataPushButton->setEnabled(false);
   volumeFunctionalThreshMetaDataPushButton->setEnabled(false);
   volumeFunctionalThresholdLabel->setEnabled(false);
   volumeFunctionalViewComboBox->clear();
   volumeFunctionalThresholdComboBox->clear();
   if (theMainWindow->getBrainSet()->getNumberOfVolumeFunctionalFiles() > 0) {
      for (int i = 0; i < theMainWindow->getBrainSet()->getNumberOfVolumeFunctionalFiles(); i++) {
         volumeFunctionalViewComboBox->addItem(
            theMainWindow->getBrainSet()->getVolumeFunctionalFile(i)->getDescriptiveLabel());
         volumeFunctionalThresholdComboBox->addItem(
            theMainWindow->getBrainSet()->getVolumeFunctionalFile(i)->getDescriptiveLabel());
      }
      volumeFunctionalViewComboBox->setCurrentIndex(dsv->getSelectedFunctionalVolumeView());
      volumeFunctionalThresholdComboBox->setCurrentIndex(dsv->getSelectedFunctionalVolumeThreshold());
      
      volumePrimaryOverlayFunctionalRadioButton->setEnabled(true);
      volumeSecondaryOverlayFunctionalRadioButton->setEnabled(true);
      volumeUnderlayFunctionalRadioButton->setEnabled(true);
      volumeFunctionalViewComboBox->setEnabled(true);
      volumeFunctionalViewLabel->setEnabled(true);
      volumeFunctionalThresholdComboBox->setEnabled(true);
      volumeFunctionalThresholdLabel->setEnabled(true);
      volumeFunctionalViewInfoPushButton->setEnabled(true);
      volumeFunctionalThreshInfoPushButton->setEnabled(true);
      volumeFunctionalViewMetaDataPushButton->setEnabled(true);
      volumeFunctionalThreshMetaDataPushButton->setEnabled(true);
   }

   //
   // update paint volume combo box
   //
   volumePrimaryOverlayPaintRadioButton->setEnabled(false);
   volumeSecondaryOverlayPaintRadioButton->setEnabled(false);
   volumeUnderlayPaintRadioButton->setEnabled(false);
   volumePaintComboBox->setEnabled(false);
   volumePaintLabel->setEnabled(false);
   volumePaintInfoPushButton->setEnabled(false);
   volumePaintMetaDataPushButton->setEnabled(false);
   volumePaintComboBox->clear();
   if (theMainWindow->getBrainSet()->getNumberOfVolumePaintFiles() > 0) {
      for (int i = 0; i < theMainWindow->getBrainSet()->getNumberOfVolumePaintFiles(); i++) {
         volumePaintComboBox->addItem(
            theMainWindow->getBrainSet()->getVolumePaintFile(i)->getDescriptiveLabel());
      }
      volumePaintComboBox->setCurrentIndex(dsv->getSelectedPaintVolume());
      
      volumePrimaryOverlayPaintRadioButton->setEnabled(true);
      volumeSecondaryOverlayPaintRadioButton->setEnabled(true);
      volumeUnderlayPaintRadioButton->setEnabled(true);
      volumePaintComboBox->setEnabled(true);
      volumePaintLabel->setEnabled(true);
      volumePaintInfoPushButton->setEnabled(true);
      volumePaintMetaDataPushButton->setEnabled(true);
   }

   //
   // update prob atlas volume combo box
   //
   volumePrimaryOverlayProbAtlasRadioButton->setEnabled(false);
   volumeSecondaryOverlayProbAtlasRadioButton->setEnabled(false);
   volumeUnderlayProbAtlasRadioButton->setEnabled(false);
   volumeProbAtlasLabel->setEnabled(false);
   volumeProbAtlasInfoPushButton->setEnabled(false);
   volumeProbAtlasMetaDataPushButton->setEnabled(false);
   if (theMainWindow->getBrainSet()->getNumberOfVolumeProbAtlasFiles() > 0) {
      volumePrimaryOverlayProbAtlasRadioButton->setEnabled(true);
      volumeSecondaryOverlayProbAtlasRadioButton->setEnabled(true);
      volumeUnderlayProbAtlasRadioButton->setEnabled(true);
      volumeProbAtlasLabel->setEnabled(true);
      volumeProbAtlasInfoPushButton->setEnabled(true);
      volumeProbAtlasMetaDataPushButton->setEnabled(true);
   }

   //
   // update rgb volume combo box
   //
   volumePrimaryOverlayRgbRadioButton->setEnabled(false);
   volumeSecondaryOverlayRgbRadioButton->setEnabled(false);
   volumeUnderlayRgbRadioButton->setEnabled(false);
   volumeRgbComboBox->setEnabled(false);
   volumeRgbLabel->setEnabled(false);
   volumeRgbComboBox->clear();
   volumeRgbInfoPushButton->setEnabled(false);
   volumeRgbMetaDataPushButton->setEnabled(false);
   if (theMainWindow->getBrainSet()->getNumberOfVolumeRgbFiles() > 0) {
      for (int i = 0; i < theMainWindow->getBrainSet()->getNumberOfVolumeRgbFiles(); i++) {
         volumeRgbComboBox->addItem(
            theMainWindow->getBrainSet()->getVolumeRgbFile(i)->getDescriptiveLabel());
      }
      volumeRgbComboBox->setCurrentIndex(dsv->getSelectedRgbVolume());
      
      volumePrimaryOverlayRgbRadioButton->setEnabled(true);
      volumeSecondaryOverlayRgbRadioButton->setEnabled(true);
      volumeUnderlayRgbRadioButton->setEnabled(true);
      volumeRgbComboBox->setEnabled(true);
      volumeRgbLabel->setEnabled(true);
      volumeRgbInfoPushButton->setEnabled(true);
      volumeRgbMetaDataPushButton->setEnabled(true);
   }

   //
   // update segmentation volume combo box
   //
   volumePrimaryOverlaySegmentationRadioButton->setEnabled(false);
   volumeSecondaryOverlaySegmentationRadioButton->setEnabled(false);
   volumeUnderlaySegmentationRadioButton->setEnabled(false);
   volumeSegmentationComboBox->setEnabled(false);
   volumeSegmentationLabel->setEnabled(false);
   volumeSegmentationInfoPushButton->setEnabled(false);
   volumeSegmentationMetaDataPushButton->setEnabled(false);
   volumeSegmentationComboBox->clear();
   if (theMainWindow->getBrainSet()->getNumberOfVolumeSegmentationFiles() > 0) {
      for (int i = 0; i < theMainWindow->getBrainSet()->getNumberOfVolumeSegmentationFiles(); i++) {
         volumeSegmentationComboBox->addItem(
            theMainWindow->getBrainSet()->getVolumeSegmentationFile(i)->getDescriptiveLabel());
      }
      volumeSegmentationComboBox->setCurrentIndex(dsv->getSelectedSegmentationVolume());
      
      volumePrimaryOverlaySegmentationRadioButton->setEnabled(true);
      volumeSecondaryOverlaySegmentationRadioButton->setEnabled(true);
      volumeUnderlaySegmentationRadioButton->setEnabled(true);
      volumeSegmentationComboBox->setEnabled(true);
      volumeSegmentationLabel->setEnabled(true);
      volumeSegmentationInfoPushButton->setEnabled(true);
      volumeSegmentationMetaDataPushButton->setEnabled(true);
   }
   
   //
   // update vector volume combo box
   //
   volumePrimaryOverlayVectorRadioButton->setEnabled(false);
   volumeSecondaryOverlayVectorRadioButton->setEnabled(false);
   volumeUnderlayVectorRadioButton->setEnabled(false);
   volumeVectorComboBox->setEnabled(false);
   volumeVectorLabel->setEnabled(false);
   volumeVectorInfoPushButton->setEnabled(false);
   volumeVectorMetaDataPushButton->setEnabled(false);
   volumeVectorComboBox->clear();
   if (theMainWindow->getBrainSet()->getNumberOfVolumeVectorFiles() > 0) {
      for (int i = 0; i < theMainWindow->getBrainSet()->getNumberOfVolumeVectorFiles(); i++) {
         volumeVectorComboBox->addItem(
            theMainWindow->getBrainSet()->getVolumeVectorFile(i)->getDescriptiveLabel());
      }
      volumeVectorComboBox->setCurrentIndex(dsv->getSelectedVectorVolume());
      
      volumePrimaryOverlayVectorRadioButton->setEnabled(true);
      volumeSecondaryOverlayVectorRadioButton->setEnabled(true);
      volumeUnderlayVectorRadioButton->setEnabled(true);
      volumeVectorComboBox->setEnabled(true);
      volumeVectorLabel->setEnabled(true);
      volumeVectorInfoPushButton->setEnabled(true);
      volumeVectorMetaDataPushButton->setEnabled(true);
      vectorVolumeSparsitySpinBox->setValue(dsv->getVectorVolumeSparsity());
   }

   updateVolumeToolTips();
   updateProbAtlasVolumeItems(true);
}


Generated by  Doxygen 1.6.0   Back to index