Search in sources :

Example 26 with LocalList

use of uk.ac.sussex.gdsc.core.utils.LocalList in project GDSC-SMLM by aherbert.

the class FailCountManager method analyseData.

private void analyseData() {
    final LocalList<FailCountData> failCountData = failCountDataRef.get();
    if (failCountData.isEmpty()) {
        IJ.error(TITLE, "No fail count data in memory");
        return;
    }
    if (!showAnalysisDialog()) {
        return;
    }
    final int maxCons = getMaxConsecutiveFailCount(failCountData);
    final int maxFail = getMaxFailCount(failCountData);
    // Create a set of fail counters
    final LocalList<FailCounter> counters = new LocalList<>();
    final TByteArrayList type = new TByteArrayList();
    for (int i = 0; i <= maxCons; i++) {
        counters.add(ConsecutiveFailCounter.create(i));
    }
    fill(type, counters, 0);
    // The other counters are user configured.
    // Ideally this would be a search to optimise the best parameters
    // for each counter as any enumeration may be way off the mark.
    // Note that 0 failures in a window can be scored using the consecutive fail counter.
    int max = Math.min(maxFail, settings.getRollingCounterMaxAllowedFailures());
    for (int fail = MathUtils.clip(1, maxFail, settings.getRollingCounterMinAllowedFailures()); fail <= max; fail++) {
        // Note that n-1 failures in window n can be scored using the consecutive fail counter.
        for (int window = Math.max(fail + 2, settings.getRollingCounterMinWindow()); window <= settings.getRollingCounterMaxWindow(); window++) {
            counters.add(RollingWindowFailCounter.create(fail, window));
        }
        switch(checkCounters(counters)) {
            case ANALYSE:
                break;
            case CONTINUE:
                break;
            case RETURN:
                return;
            default:
                throw new IllegalStateException();
        }
    }
    fill(type, counters, 1);
    max = Math.min(maxFail, settings.getWeightedCounterMaxAllowedFailures());
    for (int fail = MathUtils.min(maxFail, settings.getWeightedCounterMinAllowedFailures()); fail <= max; fail++) {
        for (int w = settings.getWeightedCounterMinPassDecrement(); w <= settings.getWeightedCounterMaxPassDecrement(); w++) {
            counters.add(WeightedFailCounter.create(fail, 1, w));
        }
        switch(checkCounters(counters)) {
            case ANALYSE:
                break;
            case CONTINUE:
                break;
            case RETURN:
                return;
            default:
                throw new IllegalStateException();
        }
    }
    fill(type, counters, 2);
    max = Math.min(maxFail, settings.getResettingCounterMaxAllowedFailures());
    for (int fail = MathUtils.min(maxFail, settings.getResettingCounterMinAllowedFailures()); fail <= max; fail++) {
        for (double f = settings.getResettingCounterMinResetFraction(); f <= settings.getResettingCounterMaxResetFraction(); f += settings.getResettingCounterIncResetFraction()) {
            counters.add(ResettingFailCounter.create(fail, f));
        }
        switch(checkCounters(counters)) {
            case ANALYSE:
                break;
            case CONTINUE:
                break;
            case RETURN:
                return;
            default:
                throw new IllegalStateException();
        }
    }
    fill(type, counters, 3);
    for (int count = settings.getPassRateCounterMinAllowedCounts(); count <= settings.getPassRateCounterMaxAllowedCounts(); count++) {
        for (double f = settings.getPassRateCounterMinPassRate(); f <= settings.getPassRateCounterMaxPassRate(); f += settings.getPassRateCounterIncPassRate()) {
            counters.add(PassRateFailCounter.create(count, f));
        }
        switch(checkCounters(counters)) {
            case ANALYSE:
                break;
            case CONTINUE:
                break;
            case RETURN:
                return;
            default:
                throw new IllegalStateException();
        }
    }
    fill(type, counters, 4);
    counters.trimToSize();
    // Score each of a set of standard fail counters against each frame using how
    // close they are to the target.
    final double[] score = new double[counters.size()];
    final double targetPassFraction = settings.getTargetPassFraction();
    final int nThreads = Prefs.getThreads();
    final ExecutorService executor = Executors.newFixedThreadPool(nThreads);
    final LocalList<Future<?>> futures = new LocalList<>(nThreads);
    final Ticker ticker = ImageJUtils.createTicker(failCountData.size(), nThreads);
    IJ.showStatus("Analysing " + TextUtils.pleural(counters.size(), "counter"));
    for (int i = 0; i < failCountData.size(); i++) {
        final FailCountData data = failCountData.unsafeGet(i);
        futures.add(executor.submit(() -> {
            if (IJ.escapePressed()) {
                return;
            }
            // TODO - Ideally this plugin should be run on benchmark data with ground truth.
            // The target could be to ensure all the correct results are fit
            // and false positives are excluded from incrementing the pass counter.
            // This could be done by saving the results from a benchmarking scoring
            // plugin to memory as the current dataset.
            data.initialiseAnalysis(targetPassFraction);
            // Score in blocks and then do a synchronized write to the combined score
            final Thread t = Thread.currentThread();
            final double[] s = new double[8192];
            int index = 0;
            while (index < counters.size()) {
                if (t.isInterrupted()) {
                    break;
                }
                final int block = Math.min(8192, counters.size() - index);
                for (int j = 0; j < block; j++) {
                    final FailCounter counter = counters.unsafeGet(index + j).newCounter();
                    s[j] = data.score(counter);
                }
                // Write to the combined score
                synchronized (score) {
                    for (int j = 0; j < block; j++) {
                        score[index + j] += s[j];
                    }
                }
                index += block;
            }
            ticker.tick();
        }));
    }
    executor.shutdown();
    ConcurrencyUtils.waitForCompletionUnchecked(futures);
    IJ.showProgress(1);
    if (IJ.escapePressed()) {
        IJ.showStatus("");
        IJ.error(TITLE, "Cancelled analysis");
        return;
    }
    IJ.showStatus("Summarising results ...");
    // TODO - check if the top filter is at the bounds of the range
    final int minIndex = SimpleArrayUtils.findMinIndex(score);
    ImageJUtils.log(TITLE + " Analysis : Best counter = %s (Score = %f)", counters.unsafeGet(minIndex).getDescription(), score[minIndex]);
    // Show a table of results for the top N for each type
    final int topN = Math.min(settings.getTableTopN(), score.length);
    if (topN > 0) {
        final byte[] types = type.toArray();
        final byte maxType = types[types.length - 1];
        final TextWindow resultsWindow = createTable();
        for (byte b = 0; b <= maxType; b++) {
            int[] indices;
            // Use a heap to avoid a full sort
            final IntDoubleMinHeap heap = new IntDoubleMinHeap(topN);
            for (int i = 0; i < score.length; i++) {
                if (types[i] == b) {
                    heap.offer(score[i], i);
                }
            }
            if (heap.getSize() == 0) {
                continue;
            }
            indices = heap.getItems();
            // Ensure sorted
            SortUtils.sortIndices(indices, score, false);
            final StringBuilder sb = new StringBuilder();
            try (final BufferedTextWindow tw = new BufferedTextWindow(resultsWindow)) {
                for (int i = 0; i < topN; i++) {
                    sb.setLength(0);
                    final int j = indices[i];
                    sb.append(i + 1).append('\t');
                    sb.append(counters.unsafeGet(j).getDescription()).append('\t');
                    sb.append(score[j]);
                    tw.append(sb.toString());
                }
            }
        }
    }
    // TODO - Save the best fail counter to the current fit configuration.
    IJ.showStatus("");
}
Also used : RollingWindowFailCounter(uk.ac.sussex.gdsc.smlm.results.count.RollingWindowFailCounter) FailCounter(uk.ac.sussex.gdsc.smlm.results.count.FailCounter) ResettingFailCounter(uk.ac.sussex.gdsc.smlm.results.count.ResettingFailCounter) ConsecutiveFailCounter(uk.ac.sussex.gdsc.smlm.results.count.ConsecutiveFailCounter) WeightedFailCounter(uk.ac.sussex.gdsc.smlm.results.count.WeightedFailCounter) PassRateFailCounter(uk.ac.sussex.gdsc.smlm.results.count.PassRateFailCounter) TByteArrayList(gnu.trove.list.array.TByteArrayList) BufferedTextWindow(uk.ac.sussex.gdsc.core.ij.BufferedTextWindow) Ticker(uk.ac.sussex.gdsc.core.logging.Ticker) LocalList(uk.ac.sussex.gdsc.core.utils.LocalList) TextWindow(ij.text.TextWindow) BufferedTextWindow(uk.ac.sussex.gdsc.core.ij.BufferedTextWindow) IntDoubleMinHeap(uk.ac.sussex.gdsc.core.trees.heaps.IntDoubleMinHeap) ExecutorService(java.util.concurrent.ExecutorService) Future(java.util.concurrent.Future)

Example 27 with LocalList

use of uk.ac.sussex.gdsc.core.utils.LocalList in project GDSC-SMLM by aherbert.

the class DriftCalculator method findSpots.

private static Spot[] findSpots(MemoryPeakResults results, Rectangle bounds, int[] limits) {
    final LocalList<Spot> list = new LocalList<>(limits[1] - limits[0] + 1);
    final float minx = bounds.x;
    final float miny = bounds.y;
    final float maxx = (float) bounds.x + bounds.width;
    final float maxy = (float) bounds.y + bounds.height;
    // Find spots within the ROI
    results.forEach(DistanceUnit.PIXEL, (XyrResultProcedure) (x, y, result) -> {
        if (x > minx && x < maxx && y > miny && y < maxy) {
            list.add(new Spot(result.getFrame(), x, y, result.getIntensity()));
        }
    });
    // For each frame pick the strongest spot
    Collections.sort(list, Spot::compare);
    final LocalList<Spot> newList = new LocalList<>(list.size());
    int currentT = -1;
    for (final Spot spot : list) {
        if (currentT != spot.time) {
            newList.add(spot);
            currentT = spot.time;
        }
    }
    return newList.toArray(new Spot[0]);
}
Also used : Color(java.awt.Color) Arrays(java.util.Arrays) ImageProcessor(ij.process.ImageProcessor) WindowMethod(uk.ac.sussex.gdsc.core.utils.ImageWindow.WindowMethod) Scanner(java.util.Scanner) Point(java.awt.Point) ResultsImageSettings(uk.ac.sussex.gdsc.smlm.data.config.ResultsProtos.ResultsImageSettings) Future(java.util.concurrent.Future) MemoryPeakResults(uk.ac.sussex.gdsc.smlm.results.MemoryPeakResults) Locale(java.util.Locale) Blitter(ij.process.Blitter) ImageJImagePeakResults(uk.ac.sussex.gdsc.smlm.ij.results.ImageJImagePeakResults) RoiManager(ij.plugin.frame.RoiManager) PlotWindow(ij.gui.PlotWindow) MathUtils(uk.ac.sussex.gdsc.core.utils.MathUtils) XyrResultProcedure(uk.ac.sussex.gdsc.smlm.results.procedures.XyrResultProcedure) Fht(uk.ac.sussex.gdsc.core.ij.process.Fht) LinearInterpolator(org.apache.commons.math3.analysis.interpolation.LinearInterpolator) LoessInterpolator(org.apache.commons.math3.analysis.interpolation.LoessInterpolator) ExtendedGenericDialog(uk.ac.sussex.gdsc.core.ij.gui.ExtendedGenericDialog) InputSource(uk.ac.sussex.gdsc.smlm.ij.plugins.ResultsManager.InputSource) AlignImagesFft(uk.ac.sussex.gdsc.core.ij.AlignImagesFft) ResultsImageType(uk.ac.sussex.gdsc.smlm.data.config.ResultsProtos.ResultsImageType) DistanceUnit(uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.DistanceUnit) ConcurrencyUtils(uk.ac.sussex.gdsc.core.utils.concurrent.ConcurrencyUtils) Plot(ij.gui.Plot) Executors(java.util.concurrent.Executors) ImagePlus(ij.ImagePlus) List(java.util.List) FileUtils(uk.ac.sussex.gdsc.core.utils.FileUtils) Pattern(java.util.regex.Pattern) PlugIn(ij.plugin.PlugIn) Roi(ij.gui.Roi) Rectangle(java.awt.Rectangle) SplineInterpolator(org.apache.commons.math3.analysis.interpolation.SplineInterpolator) PolynomialSplineFunction(org.apache.commons.math3.analysis.polynomials.PolynomialSplineFunction) Prefs(ij.Prefs) WindowManager(ij.WindowManager) WindowOrganiser(uk.ac.sussex.gdsc.core.ij.plugin.WindowOrganiser) PeakResult(uk.ac.sussex.gdsc.smlm.results.PeakResult) AtomicReference(java.util.concurrent.atomic.AtomicReference) TrackProgress(uk.ac.sussex.gdsc.core.logging.TrackProgress) OpenDialog(ij.io.OpenDialog) ArrayList(java.util.ArrayList) ImagePeakResultsFactory(uk.ac.sussex.gdsc.smlm.ij.results.ImagePeakResultsFactory) SubPixelMethod(uk.ac.sussex.gdsc.core.ij.AlignImagesFft.SubPixelMethod) PeakResultProcedure(uk.ac.sussex.gdsc.smlm.results.procedures.PeakResultProcedure) LinkedList(java.util.LinkedList) NoSuchElementException(java.util.NoSuchElementException) ExecutorService(java.util.concurrent.ExecutorService) SimpleImageJTrackProgress(uk.ac.sussex.gdsc.core.ij.SimpleImageJTrackProgress) Files(java.nio.file.Files) ResultsImageSizeMode(uk.ac.sussex.gdsc.smlm.data.config.ResultsProtos.ResultsImageSizeMode) BufferedWriter(java.io.BufferedWriter) IOException(java.io.IOException) ResultsImageMode(uk.ac.sussex.gdsc.smlm.data.config.ResultsProtos.ResultsImageMode) Ticker(uk.ac.sussex.gdsc.core.logging.Ticker) FloatProcessor(ij.process.FloatProcessor) Counter(uk.ac.sussex.gdsc.smlm.results.count.Counter) Paths(java.nio.file.Paths) ImageJUtils(uk.ac.sussex.gdsc.core.ij.ImageJUtils) IJ(ij.IJ) ImageStack(ij.ImageStack) Nullable(uk.ac.sussex.gdsc.core.annotation.Nullable) BufferedReader(java.io.BufferedReader) Collections(java.util.Collections) LocalList(uk.ac.sussex.gdsc.core.utils.LocalList) StandardResultProcedure(uk.ac.sussex.gdsc.smlm.results.procedures.StandardResultProcedure) LocalList(uk.ac.sussex.gdsc.core.utils.LocalList) Point(java.awt.Point)

Example 28 with LocalList

use of uk.ac.sussex.gdsc.core.utils.LocalList in project GDSC-SMLM by aherbert.

the class ConfigurationTemplate method loadSelectedStandardTemplates.

/**
 * Load selected standard templates.
 *
 * @param settings the settings
 */
private static void loadSelectedStandardTemplates(ConfigurationTemplateSettings.Builder settings) {
    final String[] inlineNames = listInlineTemplates();
    final TemplateResource[] templateResources = listTemplateResources();
    if (templateResources.length + inlineNames.length == 0) {
        return;
    }
    final List<String> items = new LocalList<>();
    Arrays.stream(inlineNames).forEach(items::add);
    Arrays.stream(templateResources).forEach(t -> items.add(t.name));
    final MultiDialog md = new MultiDialog("Select templates", items);
    md.setSelected(settings.getSelectedStandardTemplatesList());
    md.setHelpUrl(HelpUrls.getUrl("template-manager-load-standard"));
    md.showDialog();
    if (md.wasCancelled()) {
        return;
    }
    final List<String> selected = md.getSelectedResults();
    if (selected.isEmpty()) {
        return;
    }
    // Save
    settings.clearSelectedStandardTemplates();
    settings.addAllSelectedStandardTemplates(selected);
    int count = templates.size();
    // Keep a hash of those not loaded from inline resources
    final HashSet<String> remaining = new HashSet<>(selected.size());
    for (int i = 0; i < selected.size(); i++) {
        final String name = selected.get(i);
        // Try and get the template from inline resources
        final Template t = inlineTemplates.get(name);
        if (t != null) {
            templates.put(name, t);
        } else {
            remaining.add(name);
        }
    }
    if (!remaining.isEmpty()) {
        // Build a list of resources to load
        final LocalList<TemplateResource> list = new LocalList<>(remaining.size());
        for (final TemplateResource t : templateResources) {
            if (remaining.contains(t.name)) {
                list.add(t);
            }
        }
        loadTemplateResources(list.toArray(new TemplateResource[0]));
    }
    count = templates.size() - count;
    if (count > 0) {
        saveLoadedTemplates(templates);
        IJ.showMessage(TITLE, "Loaded " + TextUtils.pleural(count, "new standard template"));
    }
}
Also used : Point(java.awt.Point) MultiDialog(uk.ac.sussex.gdsc.core.ij.gui.MultiDialog) DefaultTemplate(uk.ac.sussex.gdsc.smlm.ij.settings.GUIProtos.DefaultTemplate) LocalList(uk.ac.sussex.gdsc.core.utils.LocalList) HashSet(java.util.HashSet)

Example 29 with LocalList

use of uk.ac.sussex.gdsc.core.utils.LocalList in project GDSC-SMLM by aherbert.

the class CubicSplineManager method createCubicSpline.

/**
 * Creates the cubic spline.
 *
 * @param imagePsf the image PSF details
 * @param image the image
 * @param singlePrecision Set to true to use single precision (float values) to store the cubic
 *        spline coefficients
 * @return the cubic spline PSF
 */
public static CubicSplinePsf createCubicSpline(ImagePSFOrBuilder imagePsf, ImageStack image, final boolean singlePrecision) {
    final int maxx = image.getWidth();
    final int maxy = image.getHeight();
    final int maxz = image.getSize();
    final float[][] psf = new float[maxz][];
    for (int z = 0; z < maxz; z++) {
        psf[z] = ImageJImageConverter.getData(image.getPixels(z + 1), null);
    }
    // We reduce by a factor of 3
    final int maxi = (maxx - 1) / 3;
    final int maxj = (maxy - 1) / 3;
    final int maxk = (maxz - 1) / 3;
    final int size = maxi * maxj;
    final CustomTricubicFunction[][] splines = new CustomTricubicFunction[maxk][size];
    final int threadCount = Prefs.getThreads();
    final Ticker ticker = ImageJUtils.createTicker((long) maxi * maxj * maxk, threadCount);
    final ExecutorService threadPool = Executors.newFixedThreadPool(threadCount);
    final LocalList<Future<?>> futures = new LocalList<>(maxk);
    // spline node along each dimension, i.e. dimension length = n*3 + 1 with n the number of nodes.
    for (int k = 0; k < maxk; k++) {
        final int kk = k;
        futures.add(threadPool.submit(() -> {
            final CubicSplineCalculator calc = new CubicSplineCalculator();
            final double[] value = new double[64];
            final int zz = 3 * kk;
            for (int j = 0, index = 0; j < maxj; j++) {
                // 4x4 block origin in the XY data
                int index0 = 3 * j * maxx;
                for (int i = 0; i < maxi; i++, index++) {
                    ticker.tick();
                    int count = 0;
                    for (int z = 0; z < 4; z++) {
                        final float[] data = psf[zz + z];
                        for (int y = 0; y < 4; y++) {
                            for (int x = 0, ii = index0 + y * maxx; x < 4; x++) {
                                value[count++] = data[ii++];
                            }
                        }
                    }
                    splines[kk][index] = CustomTricubicFunctionUtils.create(calc.compute(value));
                    if (singlePrecision) {
                        splines[kk][index] = splines[kk][index].toSinglePrecision();
                    }
                    index0 += 3;
                }
            }
        }));
    }
    ticker.stop();
    threadPool.shutdown();
    ConcurrencyUtils.waitForCompletionUnchecked(futures);
    // Normalise
    double maxSum = 0;
    for (int k = 0; k < maxk; k++) {
        double sum = 0;
        for (int i = 0; i < size; i++) {
            sum += splines[k][i].value000();
        }
        if (maxSum < sum) {
            maxSum = sum;
        }
    }
    if (maxSum == 0) {
        throw new IllegalStateException("The cubic spline has no maximum signal");
    }
    final double scale = 1.0 / maxSum;
    for (int k = 0; k < maxk; k++) {
        for (int i = 0; i < size; i++) {
            splines[k][i] = splines[k][i].scale(scale);
        }
    }
    // Create on an integer scale
    final CubicSplineData f = new CubicSplineData(maxi, maxj, splines);
    // Create a new info with the PSF details
    final ImagePSF.Builder b = ImagePSF.newBuilder();
    b.setImageCount(imagePsf.getImageCount());
    // Reducing the image has the effect of enlarging the pixel size
    b.setPixelSize(imagePsf.getPixelSize() * 3.0);
    b.setPixelDepth(imagePsf.getPixelDepth() * 3.0);
    // The centre has to be moved as we reduced the image size by 3.
    // In the ImagePSF the XY centre puts 0.5 at the centre of the pixel.
    // The spline puts 0,0 at the centre of each pixel for convenience.
    double cx = maxi / 2.0;
    if (imagePsf.getXCentre() != 0) {
        cx = (imagePsf.getXCentre() - 0.5) / 3;
    }
    double cy = maxj / 2.0;
    if (imagePsf.getYCentre() != 0) {
        cy = (imagePsf.getYCentre() - 0.5) / 3;
    }
    double cz = maxk / 2.0;
    if (imagePsf.getZCentre() != 0) {
        cz = imagePsf.getZCentre() / 3;
    } else if (imagePsf.getCentreImage() != 0) {
        cz = (imagePsf.getCentreImage() - 1) / 3.0;
    }
    b.setXCentre(cx);
    b.setYCentre(cy);
    b.setZCentre(cz);
    return new CubicSplinePsf(b.build(), f);
}
Also used : CubicSplineCalculator(uk.ac.sussex.gdsc.smlm.function.cspline.CubicSplineCalculator) Ticker(uk.ac.sussex.gdsc.core.logging.Ticker) LocalList(uk.ac.sussex.gdsc.core.utils.LocalList) ImagePSF(uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF) CubicSplineData(uk.ac.sussex.gdsc.smlm.function.cspline.CubicSplineData) ExecutorService(java.util.concurrent.ExecutorService) Future(java.util.concurrent.Future) CustomTricubicFunction(uk.ac.sussex.gdsc.core.math.interpolation.CustomTricubicFunction)

Example 30 with LocalList

use of uk.ac.sussex.gdsc.core.utils.LocalList in project GDSC-SMLM by aherbert.

the class ClassificationMatchCalculator method getCoordinates.

/**
 * Build a map between the peak id (time point) and a list of coordinates that pass the filter.
 *
 * @param results the results
 * @param test the test
 * @return the coordinates
 */
public static TIntObjectHashMap<List<PeakResultPoint>> getCoordinates(MemoryPeakResults results, Predicate<PeakResult> test) {
    final TIntObjectHashMap<List<PeakResultPoint>> coords = new TIntObjectHashMap<>();
    if (results.size() > 0) {
        // Do not use HashMap directly to build the coords object since there
        // will be many calls to getEntry(). Instead sort the results and use
        // a new list for each time point
        results.sort();
        // Create list
        final LocalList<PeakResultPoint> tmpCoords = new LocalList<>();
        // Add the results for each frame
        final FrameCounter counter = results.newFrameCounter();
        results.forEach(DistanceUnit.PIXEL, (XyzrResultProcedure) (x, y, z, r) -> {
            if (counter.advance(r.getFrame()) && !tmpCoords.isEmpty()) {
                coords.put(counter.previousFrame(), tmpCoords.copy());
                tmpCoords.clear();
            }
            if (test.test(r)) {
                tmpCoords.add(new PeakResultPoint(r.getFrame(), x, y, z, r));
            }
        });
        if (!tmpCoords.isEmpty()) {
            coords.put(counter.currentFrame(), tmpCoords.copy());
        }
    }
    return coords;
}
Also used : PeakResultPoint(uk.ac.sussex.gdsc.smlm.results.PeakResultPoint) TIntObjectHashMap(gnu.trove.map.hash.TIntObjectHashMap) Arrays(java.util.Arrays) ConfigurationException(uk.ac.sussex.gdsc.smlm.data.config.ConfigurationException) Prefs(ij.Prefs) TextWindow(ij.text.TextWindow) FrameCounter(uk.ac.sussex.gdsc.smlm.results.count.FrameCounter) PeakResult(uk.ac.sussex.gdsc.smlm.results.PeakResult) AtomicReference(java.util.concurrent.atomic.AtomicReference) ConversionException(com.thoughtworks.xstream.converters.ConversionException) TIntProcedure(gnu.trove.procedure.TIntProcedure) MemoryPeakResults(uk.ac.sussex.gdsc.smlm.results.MemoryPeakResults) MathUtils(uk.ac.sussex.gdsc.core.utils.MathUtils) LinkedList(java.util.LinkedList) SettingsManager(uk.ac.sussex.gdsc.smlm.ij.settings.SettingsManager) RandIndex(uk.ac.sussex.gdsc.core.match.RandIndex) Predicate(java.util.function.Predicate) BufferedTextWindow(uk.ac.sussex.gdsc.core.ij.BufferedTextWindow) ExtendedGenericDialog(uk.ac.sussex.gdsc.core.ij.gui.ExtendedGenericDialog) InputSource(uk.ac.sussex.gdsc.smlm.ij.plugins.ResultsManager.InputSource) ToIntFunction(java.util.function.ToIntFunction) TIntIntHashMap(gnu.trove.map.hash.TIntIntHashMap) NamedObject(uk.ac.sussex.gdsc.smlm.data.NamedObject) DistanceUnit(uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.DistanceUnit) Coordinate(uk.ac.sussex.gdsc.core.match.Coordinate) TextUtils(uk.ac.sussex.gdsc.core.utils.TextUtils) TIntHashSet(gnu.trove.set.hash.TIntHashSet) XyzrResultProcedure(uk.ac.sussex.gdsc.smlm.results.procedures.XyzrResultProcedure) List(java.util.List) PointPair(uk.ac.sussex.gdsc.core.match.PointPair) Resequencer(uk.ac.sussex.gdsc.core.match.Resequencer) ImageJUtils(uk.ac.sussex.gdsc.core.ij.ImageJUtils) IJ(ij.IJ) MatchCalculator(uk.ac.sussex.gdsc.core.match.MatchCalculator) PlugIn(ij.plugin.PlugIn) LocalList(uk.ac.sussex.gdsc.core.utils.LocalList) LocalList(uk.ac.sussex.gdsc.core.utils.LocalList) TIntObjectHashMap(gnu.trove.map.hash.TIntObjectHashMap) FrameCounter(uk.ac.sussex.gdsc.smlm.results.count.FrameCounter) LinkedList(java.util.LinkedList) List(java.util.List) LocalList(uk.ac.sussex.gdsc.core.utils.LocalList) PeakResultPoint(uk.ac.sussex.gdsc.smlm.results.PeakResultPoint)

Aggregations

LocalList (uk.ac.sussex.gdsc.core.utils.LocalList)70 PeakResult (uk.ac.sussex.gdsc.smlm.results.PeakResult)19 ExtendedGenericDialog (uk.ac.sussex.gdsc.core.ij.gui.ExtendedGenericDialog)15 MemoryPeakResults (uk.ac.sussex.gdsc.smlm.results.MemoryPeakResults)14 ImagePlus (ij.ImagePlus)13 Point (java.awt.Point)13 Future (java.util.concurrent.Future)13 Plot (ij.gui.Plot)11 ExecutorService (java.util.concurrent.ExecutorService)11 WindowOrganiser (uk.ac.sussex.gdsc.core.ij.plugin.WindowOrganiser)11 TIntArrayList (gnu.trove.list.array.TIntArrayList)10 IJ (ij.IJ)10 PlugIn (ij.plugin.PlugIn)10 Rectangle (java.awt.Rectangle)10 AtomicReference (java.util.concurrent.atomic.AtomicReference)10 ImageJUtils (uk.ac.sussex.gdsc.core.ij.ImageJUtils)10 DistanceUnit (uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.DistanceUnit)10 Color (java.awt.Color)9 Arrays (java.util.Arrays)9 Ticker (uk.ac.sussex.gdsc.core.logging.Ticker)9