예제 #1
0
void ImageTab::calculateAutoThreshold() {
  MatrixPtr matrix = _matrix->selectedMatrix();
  if (matrix) {
    matrix->readLock();
    _lowerThreshold->setText(QString::number(matrix->minValue()));
    _upperThreshold->setText(QString::number(matrix->maxValue()));
    matrix->unlock();
  }
}
예제 #2
0
void ImageTab::calculateSmartThreshold() {
  MatrixPtr matrix = _matrix->selectedMatrix();
  if (matrix) {
    matrix->readLock();
    double per = _smartThresholdValue->text().toDouble()/100.0;

    matrix->calcNoSpikeRange(per);
    _lowerThreshold->setText(QString::number(matrix->minValueNoSpike()));
    _upperThreshold->setText(QString::number(matrix->maxValueNoSpike()));
    matrix->unlock();
  }
}
예제 #3
0
DataObjectPtr Image::providerDataObject() const {
  DataObjectPtr provider = 0L;
  // FIXME: fix this.. I don't know what's going on here
#if 0
  matrixList.lock().readLock();
  MatrixPtr mp = *matrixList.findTag(matrixTag());
  matrixList.lock().unlock();
  DataObjectPtr provider = 0L;
  if (mp) {
    mp->readLock();
    provider = kst_cast<DataObject>(mp->provider());
    mp->unlock();
  }
#endif
  return provider;
}