Search in sources :

Example 1 with RelativeParameter

use of uk.ac.sussex.gdsc.smlm.data.config.FitProtos.RelativeParameter in project GDSC-SMLM by aherbert.

the class BenchmarkSpotFilter method updateConfiguration.

/**
 * Updates the given configuration using the latest settings used in benchmarking.
 *
 * @param config the configuration
 * @return true, if successful
 */
public static boolean updateConfiguration(FitEngineConfiguration config) {
    final BenchmarkSpotFilterResult result = filterResult.get();
    if (result == null) {
        return false;
    }
    final FitEngineConfiguration latestConfig = result.config;
    config.setDataFilterType(latestConfig.getDataFilterType());
    final int nFilters = latestConfig.getNumberOfFilters();
    for (int n = 0; n < nFilters; n++) {
        final RelativeParameter p = latestConfig.getDataFilterParameter(n);
        config.setDataFilter(latestConfig.getDataFilterMethod(n), p.getValue(), p.getAbsolute(), n);
    }
    config.setSearch(latestConfig.getSearch(), latestConfig.getSearchAbsolute());
    config.setBorder(latestConfig.getBorder(), latestConfig.getBorderAbsolute());
    return true;
}
Also used : FitEngineConfiguration(uk.ac.sussex.gdsc.smlm.engine.FitEngineConfiguration) RelativeParameter(uk.ac.sussex.gdsc.smlm.data.config.FitProtos.RelativeParameter) PeakResultPoint(uk.ac.sussex.gdsc.smlm.results.PeakResultPoint) BasePoint(uk.ac.sussex.gdsc.core.match.BasePoint)

Aggregations

BasePoint (uk.ac.sussex.gdsc.core.match.BasePoint)1 RelativeParameter (uk.ac.sussex.gdsc.smlm.data.config.FitProtos.RelativeParameter)1 FitEngineConfiguration (uk.ac.sussex.gdsc.smlm.engine.FitEngineConfiguration)1 PeakResultPoint (uk.ac.sussex.gdsc.smlm.results.PeakResultPoint)1