Search in sources :

Example 1 with FilePeakResults

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);
        }
    }
}
Also used : MemoryPeakResults(uk.ac.sussex.gdsc.smlm.results.MemoryPeakResults) FilePeakResults(uk.ac.sussex.gdsc.smlm.results.FilePeakResults) ImageJTablePeakResults(uk.ac.sussex.gdsc.smlm.ij.results.ImageJTablePeakResults) ImageJImagePeakResults(uk.ac.sussex.gdsc.smlm.ij.results.ImageJImagePeakResults) PeakResults(uk.ac.sussex.gdsc.smlm.results.PeakResults) ResultsFileSettings(uk.ac.sussex.gdsc.smlm.data.config.ResultsProtos.ResultsFileSettings) File(java.io.File) FilePeakResults(uk.ac.sussex.gdsc.smlm.results.FilePeakResults)

Aggregations

File (java.io.File)1 ResultsFileSettings (uk.ac.sussex.gdsc.smlm.data.config.ResultsProtos.ResultsFileSettings)1 ImageJImagePeakResults (uk.ac.sussex.gdsc.smlm.ij.results.ImageJImagePeakResults)1 ImageJTablePeakResults (uk.ac.sussex.gdsc.smlm.ij.results.ImageJTablePeakResults)1 FilePeakResults (uk.ac.sussex.gdsc.smlm.results.FilePeakResults)1 MemoryPeakResults (uk.ac.sussex.gdsc.smlm.results.MemoryPeakResults)1 PeakResults (uk.ac.sussex.gdsc.smlm.results.PeakResults)1