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

void GuiDisplayControlDialog::updateDataValidityFlags (  )  [private]

override of sizeHint (limits width of dialog but user can stretch)

update the data validity flag

update the data validity flag.

Definition at line 911 of file GuiDisplayControlDialog.cxx.

References CocomacConnectivityFile::empty(), BrainSet::getArealEstimationFile(), BrainSet::getBorderSet(), BrainSet::getBrainModelContours(), BrainSet::getBrainModelSurface(), BrainSet::getBrainModelSurfaceAndVolume(), BrainSet::getBrainModelVolume(), BrainSet::getCocomacFile(), BrainSet::getDeformationFieldFile(), BrainSet::getGeodesicDistanceFile(), BrainSet::getLatLonFile(), BrainSet::getMetricFile(), BrainModelBorderSet::getNumberOfBorders(), BrainSet::getNumberOfBrainModels(), GiftiNodeDataFile::getNumberOfColumns(), NodeAttributeFile::getNumberOfColumns(), BrainSet::getNumberOfImageFiles(), WustlRegionFile::getNumberOfTimeCourses(), BrainSet::getNumberOfVectorFiles(), BrainSet::getNumberOfVolumeFunctionalFiles(), BrainSet::getNumberOfVolumePaintFiles(), BrainSet::getNumberOfVolumeProbAtlasFiles(), BrainSet::getNumberOfVtkModelFiles(), BrainSet::getPaintFile(), BrainSet::getProbabilisticAtlasSurfaceFile(), BrainSet::getRgbPaintFile(), BrainSet::getSectionFile(), BrainSet::getSurfaceShapeFile(), BrainSet::getTopographyFile(), validArealEstimationData, validBorderData, validCellData, validCocomacData, validContourData, validDeformationFieldData, validFociData, validGeodesicData, validImageData, validLatLonData, validMetricData, validModelData, validPaintData, validProbAtlasSurfaceData, validProbAtlasVolumeData, validRegionData, validRgbPaintData, validSceneData, validSectionData, validShapeData, validSurfaceAndVolumeData, validSurfaceData, validTopographyData, validVectorData, validVolumeData, and validVolumeFunctionalData.

Referenced by updatePageSelectionComboBox().

{
   BrainSet* brainSet = theMainWindow->getBrainSet();
   bool haveSurfaceFlag = false;
   for (int i = 0; i < brainSet->getNumberOfBrainModels(); i++) {
      if (brainSet->getBrainModelSurface(i) != NULL) {
         haveSurfaceFlag = true;
         break;
      }
   }
   BrainModelBorderSet* bmbs = brainSet->getBorderSet();
   
   validSurfaceData = haveSurfaceFlag;
   validVolumeData = (brainSet->getBrainModelVolume() != NULL);
   validVolumeFunctionalData = (brainSet->getNumberOfVolumeFunctionalFiles() > 0);
   validArealEstimationData = (brainSet->getArealEstimationFile()->getNumberOfColumns() > 0);
   validBorderData = ((bmbs->getNumberOfBorders() > 0) ||
                             (theMainWindow->getBrainSet()->getVolumeBorderFile()->getNumberOfBorders() > 0));
   validCellData = ((theMainWindow->getBrainSet()->getCellProjectionFile()->getNumberOfCellProjections() > 0) ||
                       (theMainWindow->getBrainSet()->getVolumeCellFile()->empty() == false) ||
                       theMainWindow->getBrainSet()->getHaveTransformationDataCellFiles());
   validCocomacData = (brainSet->getCocomacFile()->empty() == false);
   validContourData = (brainSet->getBrainModelContours() != NULL);
   validDeformationFieldData = (brainSet->getDeformationFieldFile()->getNumberOfColumns() > 0);
   validFociData = ((theMainWindow->getBrainSet()->getFociProjectionFile()->getNumberOfCellProjections() > 0));
   validGeodesicData = (brainSet->getGeodesicDistanceFile()->getNumberOfColumns() > 0);
   validImageData = (brainSet->getNumberOfImageFiles() > 0);
   validLatLonData = (brainSet->getLatLonFile()->getNumberOfColumns() > 0);
   validMetricData = (brainSet->getMetricFile()->getNumberOfColumns() > 0);
   validModelData = (brainSet->getNumberOfVtkModelFiles() > 0);
   validPaintData = (brainSet->getPaintFile()->getNumberOfColumns() > 0);
   validProbAtlasSurfaceData = (brainSet->getProbabilisticAtlasSurfaceFile()->getNumberOfColumns() > 0);
   validProbAtlasVolumeData = (brainSet->getNumberOfVolumeProbAtlasFiles() > 0);
   const WustlRegionFile* wrf = theMainWindow->getBrainSet()->getWustlRegionFile();
   validRegionData = ((wrf->getNumberOfTimeCourses() > 0) &&
                      (brainSet->getNumberOfVolumePaintFiles() > 0));
   validRgbPaintData = (brainSet->getRgbPaintFile()->getNumberOfColumns() > 0);
   validSceneData = true;  // always valid
   validSectionData = (brainSet->getSectionFile()->getNumberOfColumns() > 0);
   validShapeData = (brainSet->getSurfaceShapeFile()->getNumberOfColumns() > 0);
   validSurfaceAndVolumeData = (brainSet->getBrainModelSurfaceAndVolume() != NULL);
   validVectorData = (brainSet->getNumberOfVectorFiles() > 0);
   validTopographyData = (brainSet->getTopographyFile()->getNumberOfColumns() > 0);
}


Generated by  Doxygen 1.6.0   Back to index