use of uk.ac.sussex.gdsc.smlm.results.FilePeakResults in project GDSC-SMLM by aherbert.
the class PeakFit method addFileResults.
private void addFileResults(PeakResultsList resultsList) {
final ResultsFileSettings resultsFileSettings = this.resultsSettings.getResultsFileSettings();
if (resultsFileSettings.getFileFormat().getNumber() > 0) {
String resultsFilename = null;
if (resultsFileSettings.getResultsDirectory() != null && new File(resultsFileSettings.getResultsDirectory()).exists()) {
resultsFilename = resultsFileSettings.getResultsDirectory() + File.separatorChar + source.getName() + ".results." + ResultsProtosHelper.getExtension(resultsFileSettings.getFileFormat());
// This is used for running via other code calling PeakFit methods,
// i.e. not as an ImageJ plugin.
} else if (pluginFlags == 0) {
resultsFilename = resultsFileSettings.getResultsFilename();
}
final PeakResults r = ResultsManager.addFileResults(resultsList, resultsFileSettings, resultsFilename, this.resultsSettings.getShowDeviations(), getShowEndFrame(), false, false);
if (r instanceof FilePeakResults) {
final FilePeakResults fr = (FilePeakResults) r;
fr.setSortAfterEnd(Prefs.getThreads() > 1);
}
}
}
Aggregations