use of uk.ac.sussex.gdsc.smlm.ij.plugins.LoadLocalisations.LocalisationList in project GDSC-SMLM by aherbert.
the class CreateData method getSimulationResults.
private static MemoryPeakResults getSimulationResults() {
if (benchmarkAuto) {
// Load directly from a results file. This is mainly to be used to load simulations
// saved to memory then saved to file.
final PeakResultsReader r = new PeakResultsReader(benchmarkFile);
final MemoryPeakResults results = r.getResults();
if (results != null) {
ResultsManager.checkCalibration(results);
return results;
}
}
// Load using a universal text file
if (loadSettings == null) {
loadSettings = SettingsManager.readLoadLocalisationsSettings(0).toBuilder();
}
// String tmp = loadSettings.getLocalisationsFilename();
loadSettings.setLocalisationsFilename(benchmarkFile);
// Ignore fields that are not required,
// e.g. the dataset name
final boolean hide = loadSettings.getHideFieldDatasetName();
loadSettings.setHideFieldDatasetName(true);
final LocalisationList localisations = LoadLocalisations.loadLocalisations(loadSettings);
loadSettings.setHideFieldDatasetName(hide);
SettingsManager.writeSettings(loadSettings.build());
if (localisations == null || localisations.isEmpty()) {
return null;
}
return localisations.toPeakResults("Dummy");
}
Aggregations