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;
}
Aggregations