use of gdsc.smlm.filters.SpotFilter in project GDSC-SMLM by aherbert.
the class PeakFit method createFitEngine.
/**
* Creates a fitting engine using the current configuration.
*
* @param numberOfThreads
* @param queue
* @param queueSize
* @return The fiting engine
*/
public FitEngine createFitEngine(int numberOfThreads, FitQueue queue, int queueSize) {
PeakResults r = results;
if (results.numberOfOutputs() == 1)
// Reduce to single object for speed
r = results.toArray()[0];
// Update the configuration
updateFitConfiguration(config);
FitEngine engine = new FitEngine(config, r, numberOfThreads, queue, queueSize);
// Write settings out to the IJ log
if (resultsSettings.logProgress) {
IJ.log("-=-=-=-");
IJ.log("Peak Fit");
IJ.log("-=-=-=-");
Utils.log("Initial Peak SD = %s,%s", Utils.rounded(fitConfig.getInitialPeakStdDev0()), Utils.rounded(fitConfig.getInitialPeakStdDev1()));
SpotFilter spotFilter = engine.getSpotFilter();
IJ.log("Spot Filter = " + spotFilter.getDescription());
int w = 2 * engine.getFitting() + 1;
Utils.log("Fit window = %d x %d", w, w);
if (!fitConfig.isDisableSimpleFilter()) {
IJ.log("Coordinate shift = " + Utils.rounded(config.getFitConfiguration().getCoordinateShift()));
IJ.log("Signal strength = " + Utils.rounded(fitConfig.getSignalStrength()));
}
if (fitConfig.isDirectFilter())
IJ.log("Smart filter = " + fitConfig.getSmartFilter().getDescription());
if (extraOptions)
IJ.log("Noise = " + Utils.rounded(fitConfig.getNoise()));
IJ.log("Width factor = " + Utils.rounded(fitConfig.getWidthFactor()));
IJ.log("-=-=-=-");
}
return engine;
}
Aggregations