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

void GuiDisplayControlDialog::updateSurfaceAndVolumeItems (  ) 

update the surface and volume selections

update the surface and volume selections.

Definition at line 5057 of file GuiDisplayControlDialog.cxx.

References WuQWidgetGroup::blockSignals(), BrainModelSurfaceAndVolume::getAnatomyVolumeFile(), VolumeFile::getDimensions(), BrainModelSurfaceAndVolume::getDisplayCoronalSlice(), BrainModelSurfaceAndVolume::getDisplayFunctionalVolumeCloud(), BrainModelSurfaceAndVolume::getDisplayHorizontalSlice(), BrainModelSurfaceAndVolume::getDisplayParasagittalSlice(), BrainModelSurfaceAndVolume::getDisplayPrimaryOverlayVolumeOnSlices(), BrainModelSurfaceAndVolume::getDisplaySecondaryOverlayVolumeOnSlices(), BrainModelSurfaceAndVolume::getDisplaySegmentationVolumeCloud(), BrainModelSurfaceAndVolume::getDisplaySurface(), BrainModelSurfaceAndVolume::getDisplayVectorVolumeCloud(), BrainModelSurfaceAndVolume::getDrawAnatomyBlackVoxels(), BrainModelSurfaceAndVolume::getFunctionalVolumeCloudOpacity(), BrainModelSurfaceAndVolume::getFunctionalVolumeCloudOpacityEnabled(), BrainModelSurfaceAndVolume::getFunctionalVolumeDistanceThreshold(), BrainModelSurfaceAndVolume::getFunctionalVolumeFile(), BrainModelSurfaceAndVolume::getSegmentationVolumeFile(), BrainModelSurfaceAndVolume::getSelectedSlices(), BrainModelSurfaceAndVolume::getVectorVolumeFile(), pageSurfaceAndVolume, pageSurfaceAndVolumeWidgetGroup, surfaceAndVolumeAnatomyBlackCheckBox, surfaceAndVolumeCoronalSliceCheckBox, surfaceAndVolumeCoronalSliceSpinBox, surfaceAndVolumeFunctionalCloudOpacityCheckBox, surfaceAndVolumeFunctionalCloudOpacitySpinBox, surfaceAndVolumeFunctionalDistanceSpinBox, surfaceAndVolumeFunctionalGroupBox, surfaceAndVolumeHorizontalSliceCheckBox, surfaceAndVolumeHorizontalSliceSpinBox, surfaceAndVolumeParasagittalSliceCheckBox, surfaceAndVolumeParasagittalSliceSpinBox, surfaceAndVolumeSegmentationGroupBox, surfaceAndVolumeShowFunctionalCloudCheckBox, surfaceAndVolumeShowPrimaryCheckBox, surfaceAndVolumeShowSecondaryCheckBox, surfaceAndVolumeShowSegmentationCloudCheckBox, surfaceAndVolumeShowSurfaceCheckBox, surfaceAndVolumeShowVectorCloudCheckBox, surfaceAndVolumeVectorVBox, updatePageSelectionComboBox(), and validSurfaceAndVolumeData.

Referenced by GuiMainWindow::fileModificationUpdate(), showDisplayControlPage(), and updateAllItemsInDialog().

{
   updatePageSelectionComboBox();
   if (pageSurfaceAndVolume == NULL) {
      return;
   }
   pageSurfaceAndVolumeWidgetGroup->blockSignals(true);
   
   BrainModelSurfaceAndVolume* bmsv = theMainWindow->getBrainSet()->getBrainModelSurfaceAndVolume();
   if (bmsv != NULL) {
      pageSurfaceAndVolume->setEnabled(validSurfaceAndVolumeData);
      
      surfaceAndVolumeShowSurfaceCheckBox->setChecked(bmsv->getDisplaySurface());
      
      surfaceAndVolumeHorizontalSliceCheckBox->setChecked(bmsv->getDisplayHorizontalSlice());
      surfaceAndVolumeParasagittalSliceCheckBox->setChecked(bmsv->getDisplayParasagittalSlice());
      surfaceAndVolumeCoronalSliceCheckBox->setChecked(bmsv->getDisplayCoronalSlice());
      
      int dim[3] = { 0, 0, 0 };
      VolumeFile* anatomyVolumeFile = bmsv->getAnatomyVolumeFile();
      if (anatomyVolumeFile != NULL) {
         anatomyVolumeFile->getDimensions(dim);
      }
      
      surfaceAndVolumeParasagittalSliceSpinBox->setMaximum(dim[0]);
      surfaceAndVolumeCoronalSliceSpinBox->setMaximum(dim[1]);
      surfaceAndVolumeHorizontalSliceSpinBox->setMaximum(dim[2]);

      int slices[3];
      bmsv->getSelectedSlices(slices);
      surfaceAndVolumeParasagittalSliceSpinBox->setValue(slices[0]);
      surfaceAndVolumeCoronalSliceSpinBox->setValue(slices[1]);
      surfaceAndVolumeHorizontalSliceSpinBox->setValue(slices[2]);

      surfaceAndVolumeShowPrimaryCheckBox->setChecked(bmsv->getDisplayPrimaryOverlayVolumeOnSlices());
      surfaceAndVolumeShowSecondaryCheckBox->setChecked(bmsv->getDisplaySecondaryOverlayVolumeOnSlices());
      
      if (bmsv->getFunctionalVolumeFile() != NULL) {
         surfaceAndVolumeFunctionalGroupBox->setEnabled(true);
         surfaceAndVolumeShowFunctionalCloudCheckBox->setChecked(bmsv->getDisplayFunctionalVolumeCloud());
         surfaceAndVolumeFunctionalCloudOpacityCheckBox->setChecked(bmsv->getFunctionalVolumeCloudOpacityEnabled());
         surfaceAndVolumeFunctionalCloudOpacitySpinBox->setValue(bmsv->getFunctionalVolumeCloudOpacity());
      }
      else {
         surfaceAndVolumeFunctionalGroupBox->setEnabled(false);
      }
      surfaceAndVolumeFunctionalDistanceSpinBox->setValue(bmsv->getFunctionalVolumeDistanceThreshold());

      if (bmsv->getSegmentationVolumeFile() != NULL) {
         surfaceAndVolumeSegmentationGroupBox->setEnabled(true);
         surfaceAndVolumeShowSegmentationCloudCheckBox->setChecked(bmsv->getDisplaySegmentationVolumeCloud());
      }
      else {
         surfaceAndVolumeSegmentationGroupBox->setEnabled(false);
      }
      surfaceAndVolumeAnatomyBlackCheckBox->setChecked(bmsv->getDrawAnatomyBlackVoxels());
      
      if (bmsv->getVectorVolumeFile() != NULL) {
         surfaceAndVolumeVectorVBox->setEnabled(true);
         surfaceAndVolumeShowVectorCloudCheckBox->setChecked(bmsv->getDisplayVectorVolumeCloud());
      }
      else {
         surfaceAndVolumeVectorVBox->setEnabled(false);
      }
   }
   else {
      pageSurfaceAndVolume->setEnabled(false);
   }
   
   updatePageSelectionComboBox();
   pageSurfaceAndVolumeWidgetGroup->blockSignals(false);
}      


Generated by  Doxygen 1.6.0   Back to index