Search in sources :

Example 1 with ImageJImagePeakResults

use of uk.ac.sussex.gdsc.smlm.ij.results.ImageJImagePeakResults in project GDSC-SMLM by aherbert.

the class FrcTest method canComputeMirrored.

@SeededTest
void canComputeMirrored(RandomSeed seed) {
    // Sample lines through an image to create a structure.
    final int size = 1024;
    final double[][] data = new double[size * 2][];
    final UniformRandomProvider r = RngUtils.create(seed.getSeed());
    final SharedStateContinuousSampler gs = SamplerUtils.createGaussianSampler(r, 0, 5);
    for (int x = 0, y = 0, y2 = size, i = 0; x < size; x++, y++, y2--) {
        data[i++] = new double[] { x + gs.sample(), y + gs.sample() };
        data[i++] = new double[] { x + gs.sample(), y2 + gs.sample() };
    }
    // Create 2 images
    final Rectangle bounds = new Rectangle(0, 0, size, size);
    ImageJImagePeakResults i1 = createImage(bounds);
    ImageJImagePeakResults i2 = createImage(bounds);
    final int[] indices = SimpleArrayUtils.natural(data.length);
    PermutationSampler.shuffle(r, indices);
    for (final int i : indices) {
        final ImageJImagePeakResults image = i1;
        i1 = i2;
        i2 = image;
        image.add((float) data[i][0], (float) data[i][1], 1);
    }
    i1.end();
    i2.end();
    final ImageProcessor ip1 = i1.getImagePlus().getProcessor();
    final ImageProcessor ip2 = i2.getImagePlus().getProcessor();
    // Test
    final Frc frc = new Frc();
    FloatProcessor[] fft1;
    FloatProcessor[] fft2;
    fft1 = frc.getComplexFft(ip1);
    fft2 = frc.getComplexFft(ip2);
    final float[] dataA1 = (float[]) fft1[0].getPixels();
    final float[] dataB1 = (float[]) fft1[1].getPixels();
    final float[] dataA2 = (float[]) fft2[0].getPixels();
    final float[] dataB2 = (float[]) fft2[1].getPixels();
    final float[] numeratorE = new float[dataA1.length];
    final float[] absFft1E = new float[dataA1.length];
    final float[] absFft2E = new float[dataA1.length];
    Frc.compute(numeratorE, absFft1E, absFft2E, dataA1, dataB1, dataA2, dataB2);
    Assertions.assertTrue(checkSymmetry(numeratorE, size), "numeratorE");
    Assertions.assertTrue(checkSymmetry(absFft1E, size), "absFft1E");
    Assertions.assertTrue(checkSymmetry(absFft2E, size), "absFft2E");
    final float[] numeratorA = new float[dataA1.length];
    final float[] absFft1A = new float[dataA1.length];
    final float[] absFft2A = new float[dataA1.length];
    Frc.computeMirrored(size, numeratorA, absFft1A, absFft2A, dataA1, dataB1, dataA2, dataB2);
    // for (int y=0, i=0; y<size; y++)
    // for (int x=0; x<size; x++, i++)
    // {
    // logger.fine(FunctionUtils.getSupplier("[%d,%d = %d] %f ?= %f", x, y, i, numeratorE[i],
    // numeratorA[i]);
    // }
    Assertions.assertArrayEquals(numeratorE, numeratorA, "numerator");
    Assertions.assertArrayEquals(absFft1E, absFft1A, "absFft1");
    Assertions.assertArrayEquals(absFft2E, absFft2A, "absFft2");
    Frc.computeMirroredFast(size, numeratorA, absFft1A, absFft2A, dataA1, dataB1, dataA2, dataB2);
    // Check this.
    for (int y = 1; y < size; y++) {
        for (int x = 1, i = y * size + 1; x < size; x++, i++) {
            Assertions.assertEquals(numeratorE[i], numeratorA[i], "numerator");
            Assertions.assertEquals(absFft1E[i], absFft1A[i], "absFft1");
            Assertions.assertEquals(absFft2E[i], absFft2A[i], "absFft2");
        }
    }
}
Also used : ImageProcessor(ij.process.ImageProcessor) FloatProcessor(ij.process.FloatProcessor) SharedStateContinuousSampler(org.apache.commons.rng.sampling.distribution.SharedStateContinuousSampler) Rectangle(java.awt.Rectangle) UniformRandomProvider(org.apache.commons.rng.UniformRandomProvider) ImageJImagePeakResults(uk.ac.sussex.gdsc.smlm.ij.results.ImageJImagePeakResults) SeededTest(uk.ac.sussex.gdsc.test.junit5.SeededTest)

Example 2 with ImageJImagePeakResults

use of uk.ac.sussex.gdsc.smlm.ij.results.ImageJImagePeakResults in project GDSC-SMLM by aherbert.

the class FrcTest method computeMirroredIsFaster.

@SeededTest
void computeMirroredIsFaster(RandomSeed seed) {
    Assumptions.assumeTrue(TestSettings.allow(TestComplexity.MEDIUM));
    // Sample lines through an image to create a structure.
    final int N = 2048;
    final double[][] data = new double[N * 2][];
    final UniformRandomProvider r = RngUtils.create(seed.getSeed());
    final SharedStateContinuousSampler gs = SamplerUtils.createGaussianSampler(r, 0, 5);
    for (int x = 0, y = 0, y2 = N, i = 0; x < N; x++, y++, y2--) {
        data[i++] = new double[] { x + gs.sample(), y + gs.sample() };
        data[i++] = new double[] { x + gs.sample(), y2 + gs.sample() };
    }
    // Create 2 images
    final Rectangle bounds = new Rectangle(0, 0, N, N);
    ImageJImagePeakResults i1 = createImage(bounds);
    ImageJImagePeakResults i2 = createImage(bounds);
    final int[] indices = SimpleArrayUtils.natural(data.length);
    PermutationSampler.shuffle(r, indices);
    for (final int i : indices) {
        final ImageJImagePeakResults image = i1;
        i1 = i2;
        i2 = image;
        image.add((float) data[i][0], (float) data[i][1], 1);
    }
    i1.end();
    i2.end();
    final ImageProcessor ip1 = i1.getImagePlus().getProcessor();
    final ImageProcessor ip2 = i2.getImagePlus().getProcessor();
    // Test
    final Frc frc = new Frc();
    FloatProcessor[] fft1;
    FloatProcessor[] fft2;
    fft1 = frc.getComplexFft(ip1);
    fft2 = frc.getComplexFft(ip2);
    final float[] dataA1 = (float[]) fft1[0].getPixels();
    final float[] dataB1 = (float[]) fft1[1].getPixels();
    final float[] dataA2 = (float[]) fft2[0].getPixels();
    final float[] dataB2 = (float[]) fft2[1].getPixels();
    final float[] numerator = new float[dataA1.length];
    final float[] absFft1 = new float[dataA1.length];
    final float[] absFft2 = new float[dataA1.length];
    final TimingService ts = new TimingService(10);
    ts.execute(new MyTimingTask("compute") {

        @Override
        public Object run(Object data) {
            Frc.compute(numerator, absFft1, absFft2, dataA1, dataB1, dataA2, dataB2);
            return null;
        }
    });
    ts.execute(new MyTimingTask("computeMirrored") {

        @Override
        public Object run(Object data) {
            Frc.computeMirrored(N, numerator, absFft1, absFft2, dataA1, dataB1, dataA2, dataB2);
            return null;
        }
    });
    ts.execute(new MyTimingTask("computeMirroredFast") {

        @Override
        public Object run(Object data) {
            Frc.computeMirroredFast(N, numerator, absFft1, absFft2, dataA1, dataB1, dataA2, dataB2);
            return null;
        }
    });
    final int size = ts.getSize();
    ts.repeat(size);
    if (logger.isLoggable(Level.INFO)) {
        logger.info(ts.getReport(size));
    }
    // The 'Fast' method may not always be faster so just log results
    final TimingResult slow = ts.get(-3);
    final TimingResult fast = ts.get(-2);
    final TimingResult fastest = ts.get(-1);
    logger.log(TestLogUtils.getTimingRecord(slow, fastest));
    logger.log(TestLogUtils.getTimingRecord(fast, fastest));
    // It should be faster than the non mirrored version
    Assertions.assertTrue(ts.get(-1).getMean() <= ts.get(-3).getMean());
}
Also used : TimingResult(uk.ac.sussex.gdsc.test.utils.TimingResult) FloatProcessor(ij.process.FloatProcessor) SharedStateContinuousSampler(org.apache.commons.rng.sampling.distribution.SharedStateContinuousSampler) Rectangle(java.awt.Rectangle) ImageJImagePeakResults(uk.ac.sussex.gdsc.smlm.ij.results.ImageJImagePeakResults) ImageProcessor(ij.process.ImageProcessor) UniformRandomProvider(org.apache.commons.rng.UniformRandomProvider) TimingService(uk.ac.sussex.gdsc.test.utils.TimingService) SeededTest(uk.ac.sussex.gdsc.test.junit5.SeededTest)

Example 3 with ImageJImagePeakResults

use of uk.ac.sussex.gdsc.smlm.ij.results.ImageJImagePeakResults in project GDSC-SMLM by aherbert.

the class FrcTest method createImage.

private static ImageJImagePeakResults createImage(Rectangle bounds) {
    final ImageJImagePeakResults i1 = new ImageJImagePeakResults("1", bounds, 1);
    i1.setDisplayImage(false);
    i1.begin();
    return i1;
}
Also used : ImageJImagePeakResults(uk.ac.sussex.gdsc.smlm.ij.results.ImageJImagePeakResults)

Example 4 with ImageJImagePeakResults

use of uk.ac.sussex.gdsc.smlm.ij.results.ImageJImagePeakResults in project GDSC-SMLM by aherbert.

the class PulseActivationAnalysis method runSimulation.

private void runSimulation() {
    title += " Simulation";
    if (!showSimulationDialog()) {
        return;
    }
    final long start = System.currentTimeMillis();
    final UniformRandomProvider rng = getUniformRandomProvider();
    // Draw the molecule positions
    ImageJUtils.showStatus("Simulating molecules ...");
    final float[][][] molecules = new float[3][][];
    final MemoryPeakResults[] channelResults = new MemoryPeakResults[3];
    final Calibration calibration = CalibrationHelper.create(settings.nmPerPixel, 1, 100);
    final Rectangle bounds = new Rectangle(settings.size, settings.size);
    for (int c = 0; c < 3; c++) {
        molecules[c] = simulateMolecules(rng, c);
        // Create a dataset to store the activations
        final MemoryPeakResults r = new MemoryPeakResults();
        r.setCalibration(calibration);
        r.setBounds(bounds);
        r.setName(title + " C" + (c + 1));
        channelResults[c] = r;
    }
    // Simulate activation
    ImageJUtils.showStatus("Simulating activations ...");
    for (int c = 0; c < 3; c++) {
        simulateActivations(rng, molecules, c, channelResults);
    }
    // Combine
    ImageJUtils.showStatus("Producing simulation output ...");
    final MemoryPeakResults r = new MemoryPeakResults();
    r.setCalibration(calibration);
    r.setBounds((Rectangle) bounds.clone());
    r.setName(title);
    final ImageProcessor[] images = new ImageProcessor[3];
    for (int c = 0; c < 3; c++) {
        final PeakResult[] list = channelResults[c].toArray();
        r.addAll(list);
        // Draw the unmixed activations
        final ResultsImageSettings.Builder builder = ResultsImageSettings.newBuilder().setImageType(ResultsImageType.DRAW_LOCALISATIONS).setImageMode(ResultsImageMode.IMAGE_ADD).setWeighted(true).setEqualised(true).setImageSizeMode(ResultsImageSizeMode.IMAGE_SIZE).setImageSize(1024);
        final ImageJImagePeakResults image = ImagePeakResultsFactory.createPeakResultsImage(builder, title, bounds, settings.nmPerPixel);
        image.setCalibration(calibration);
        image.setLiveImage(false);
        image.setDisplayImage(false);
        image.begin();
        image.addAll(list);
        image.end();
        images[c] = image.getImagePlus().getProcessor();
    }
    displayComposite(images, title);
    // Add to memory. Set the composite dataset first.
    MemoryPeakResults.addResults(r);
    for (int c = 0; c < 3; c++) {
        MemoryPeakResults.addResults(channelResults[c]);
    }
    // TODO:
    // Show an image of what it looks like with no unmixing, i.e. colours allocated
    // from the frame
    ImageJUtils.showStatus("Simulation complete: " + TextUtils.millisToString(System.currentTimeMillis() - start));
}
Also used : Rectangle(java.awt.Rectangle) Calibration(uk.ac.sussex.gdsc.smlm.data.config.CalibrationProtos.Calibration) ResultsImageSettings(uk.ac.sussex.gdsc.smlm.data.config.ResultsProtos.ResultsImageSettings) ImageJImagePeakResults(uk.ac.sussex.gdsc.smlm.ij.results.ImageJImagePeakResults) IdPeakResult(uk.ac.sussex.gdsc.smlm.results.IdPeakResult) PeakResult(uk.ac.sussex.gdsc.smlm.results.PeakResult) ImageProcessor(ij.process.ImageProcessor) UniformRandomProvider(org.apache.commons.rng.UniformRandomProvider) SplittableUniformRandomProvider(uk.ac.sussex.gdsc.core.utils.rng.SplittableUniformRandomProvider) MemoryPeakResults(uk.ac.sussex.gdsc.smlm.results.MemoryPeakResults)

Example 5 with ImageJImagePeakResults

use of uk.ac.sussex.gdsc.smlm.ij.results.ImageJImagePeakResults in project GDSC-SMLM by aherbert.

the class Fire method createImages.

/**
 * Creates the images to use for the FIRE calculation. This must be called after
 * {@link #initialise(MemoryPeakResults, MemoryPeakResults)}.
 *
 * @param fourierImageScale the fourier image scale (set to zero to auto compute)
 * @param imageSize the image size
 * @param useSignal Use the localisation signal to weight the intensity. The default uses a value
 *        of 1 per localisation.
 * @return the fire images
 */
public FireImages createImages(double fourierImageScale, int imageSize, boolean useSignal) {
    if (results == null) {
        return null;
    }
    final SignalProvider signalProvider = (useSignal && (results.hasIntensity())) ? new PeakSignalProvider() : new FixedSignalProvider();
    // Draw images using the existing IJ routines.
    final Rectangle bounds = new Rectangle((int) Math.ceil(dataBounds.getWidth()), (int) Math.ceil(dataBounds.getHeight()));
    final ResultsImageSettings.Builder builder = ResultsImageSettings.newBuilder().setImageType(ResultsImageType.DRAW_NONE).setWeighted(true).setEqualised(false).setImageMode(ResultsImageMode.IMAGE_ADD);
    if (fourierImageScale > 0) {
        builder.setImageSizeMode(ResultsImageSizeMode.SCALED);
        builder.setScale(fourierImageScale);
    } else {
        builder.setImageSizeMode(ResultsImageSizeMode.IMAGE_SIZE);
        builder.setImageSize(imageSize);
    }
    ImageJImagePeakResults image1 = createPeakResultsImage(bounds, builder, "IP1");
    ImageJImagePeakResults image2 = createPeakResultsImage(bounds, builder, "IP2");
    final float minx = (float) dataBounds.getX();
    final float miny = (float) dataBounds.getY();
    if (this.results2 != null) {
        // Two image comparison
        final ImageJImagePeakResults i1 = image1;
        results.forEach((PeakResultProcedure) result -> {
            final float x = result.getXPosition() - minx;
            final float y = result.getYPosition() - miny;
            i1.add(x, y, signalProvider.getSignal(result));
        });
        final ImageJImagePeakResults i2 = image2;
        results2.forEach((PeakResultProcedure) result -> {
            final float x = result.getXPosition() - minx;
            final float y = result.getYPosition() - miny;
            i2.add(x, y, signalProvider.getSignal(result));
        });
    } else {
        // Block sampling.
        // Ensure we have at least 2 even sized blocks.
        int blockSize = Math.min(results.size() / 2, Math.max(1, settings.blockSize));
        int nblocks = (int) Math.ceil((double) results.size() / blockSize);
        while (nblocks <= 1 && blockSize > 1) {
            blockSize /= 2;
            nblocks = (int) Math.ceil((double) results.size() / blockSize);
        }
        if (nblocks <= 1) {
            // This should not happen since the results should contain at least 2 localisations
            return null;
        }
        if (blockSize != settings.blockSize) {
            IJ.log(pluginTitle + " Warning: Changed block size to " + blockSize);
        }
        final Counter i = new Counter();
        final Counter block = new Counter();
        final int finalBlockSize = blockSize;
        final PeakResult[][] blocks = new PeakResult[nblocks][blockSize];
        results.forEach((PeakResultProcedure) result -> {
            if (i.getCount() == finalBlockSize) {
                block.increment();
                i.reset();
            }
            blocks[block.getCount()][i.getAndIncrement()] = result;
        });
        // Truncate last block
        blocks[block.getCount()] = Arrays.copyOf(blocks[block.getCount()], i.getCount());
        final int[] indices = SimpleArrayUtils.natural(block.getCount() + 1);
        if (settings.randomSplit) {
            MathArrays.shuffle(indices);
        }
        for (final int index : indices) {
            // Split alternating so just rotate
            final ImageJImagePeakResults image = image1;
            image1 = image2;
            image2 = image;
            for (final PeakResult p : blocks[index]) {
                final float x = p.getXPosition() - minx;
                final float y = p.getYPosition() - miny;
                image.add(x, y, signalProvider.getSignal(p));
            }
        }
    }
    image1.end();
    final ImageProcessor ip1 = image1.getImagePlus().getProcessor();
    image2.end();
    final ImageProcessor ip2 = image2.getImagePlus().getProcessor();
    if (settings.maxPerBin > 0 && signalProvider instanceof FixedSignalProvider) {
        // We can eliminate over-sampled pixels
        for (int i = ip1.getPixelCount(); i-- > 0; ) {
            if (ip1.getf(i) > settings.maxPerBin) {
                ip1.setf(i, settings.maxPerBin);
            }
            if (ip2.getf(i) > settings.maxPerBin) {
                ip2.setf(i, settings.maxPerBin);
            }
        }
    }
    return new FireImages(ip1, ip2, nmPerUnit / image1.getScale());
}
Also used : Color(java.awt.Color) RandomUtils(uk.ac.sussex.gdsc.core.utils.rng.RandomUtils) Arrays(java.util.Arrays) Macro(ij.Macro) ImageProcessor(ij.process.ImageProcessor) Rectangle2D(java.awt.geom.Rectangle2D) Future(java.util.concurrent.Future) Pair(org.apache.commons.lang3.tuple.Pair) MemoryPeakResults(uk.ac.sussex.gdsc.smlm.results.MemoryPeakResults) GoalType(org.apache.commons.math3.optim.nonlinear.scalar.GoalType) UnivariateObjectiveFunction(org.apache.commons.math3.optim.univariate.UnivariateObjectiveFunction) LutHelper(uk.ac.sussex.gdsc.core.ij.process.LutHelper) WeightedObservedPoint(org.apache.commons.math3.fitting.WeightedObservedPoint) ThresholdMethod(uk.ac.sussex.gdsc.smlm.ij.frc.Frc.ThresholdMethod) XyrResultProcedure(uk.ac.sussex.gdsc.smlm.results.procedures.XyrResultProcedure) LoessInterpolator(org.apache.commons.math3.analysis.interpolation.LoessInterpolator) InputSource(uk.ac.sussex.gdsc.smlm.ij.plugins.ResultsManager.InputSource) DistanceUnit(uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.DistanceUnit) SimpleCurveFitter(org.apache.commons.math3.fitting.SimpleCurveFitter) PointValuePair(org.apache.commons.math3.optim.PointValuePair) NelderMeadSimplex(org.apache.commons.math3.optim.nonlinear.scalar.noderiv.NelderMeadSimplex) ConcurrencyUtils(uk.ac.sussex.gdsc.core.utils.concurrent.ConcurrencyUtils) TextUtils(uk.ac.sussex.gdsc.core.utils.TextUtils) Plot(ij.gui.Plot) Scrollbar(java.awt.Scrollbar) Executors(java.util.concurrent.Executors) ImagePlus(ij.ImagePlus) TDoubleArrayList(gnu.trove.list.array.TDoubleArrayList) FrcCurveResult(uk.ac.sussex.gdsc.smlm.ij.frc.Frc.FrcCurveResult) MaxEval(org.apache.commons.math3.optim.MaxEval) PlugIn(ij.plugin.PlugIn) AtomicDouble(com.google.common.util.concurrent.AtomicDouble) MathArrays(org.apache.commons.math3.util.MathArrays) Prefs(ij.Prefs) WindowManager(ij.WindowManager) PeakResult(uk.ac.sussex.gdsc.smlm.results.PeakResult) UnivariateOptimizer(org.apache.commons.math3.optim.univariate.UnivariateOptimizer) GenericDialog(ij.gui.GenericDialog) PeakResultProcedure(uk.ac.sussex.gdsc.smlm.results.procedures.PeakResultProcedure) GaussianCurveFitter(org.apache.commons.math3.fitting.GaussianCurveFitter) ResultsImageSizeMode(uk.ac.sussex.gdsc.smlm.data.config.ResultsProtos.ResultsImageSizeMode) FourierMethod(uk.ac.sussex.gdsc.smlm.ij.frc.Frc.FourierMethod) MouseEvent(java.awt.event.MouseEvent) DescriptiveStatistics(org.apache.commons.math3.stat.descriptive.DescriptiveStatistics) Erf(uk.ac.sussex.gdsc.smlm.function.Erf) UnivariatePointValuePair(org.apache.commons.math3.optim.univariate.UnivariatePointValuePair) SamplingMethod(uk.ac.sussex.gdsc.smlm.ij.frc.Frc.SamplingMethod) Frc(uk.ac.sussex.gdsc.smlm.ij.frc.Frc) DoubleMedianWindow(uk.ac.sussex.gdsc.core.utils.DoubleMedianWindow) FrcFireResult(uk.ac.sussex.gdsc.smlm.ij.frc.Frc.FrcFireResult) ResultsImageSettings(uk.ac.sussex.gdsc.smlm.data.config.ResultsProtos.ResultsImageSettings) StoredDataStatistics(uk.ac.sussex.gdsc.core.utils.StoredDataStatistics) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) ImageJImagePeakResults(uk.ac.sussex.gdsc.smlm.ij.results.ImageJImagePeakResults) MouseAdapter(java.awt.event.MouseAdapter) DataException(uk.ac.sussex.gdsc.core.data.DataException) NonBlockingExtendedGenericDialog(uk.ac.sussex.gdsc.core.ij.gui.NonBlockingExtendedGenericDialog) PlotWindow(ij.gui.PlotWindow) MathUtils(uk.ac.sussex.gdsc.core.utils.MathUtils) SettingsManager(uk.ac.sussex.gdsc.smlm.ij.settings.SettingsManager) Collection(java.util.Collection) ExtendedGenericDialog(uk.ac.sussex.gdsc.core.ij.gui.ExtendedGenericDialog) TrackProgressAdaptor(uk.ac.sussex.gdsc.core.logging.TrackProgressAdaptor) ResultsImageType(uk.ac.sussex.gdsc.smlm.data.config.ResultsProtos.ResultsImageType) ParametricUnivariateFunction(org.apache.commons.math3.analysis.ParametricUnivariateFunction) ObjectiveFunction(org.apache.commons.math3.optim.nonlinear.scalar.ObjectiveFunction) SimplexOptimizer(org.apache.commons.math3.optim.nonlinear.scalar.noderiv.SimplexOptimizer) BracketFinder(org.apache.commons.math3.optim.univariate.BracketFinder) List(java.util.List) Gaussian(org.apache.commons.math3.analysis.function.Gaussian) SimpleArrayUtils(uk.ac.sussex.gdsc.core.utils.SimpleArrayUtils) UnivariateFunction(org.apache.commons.math3.analysis.UnivariateFunction) MultivariateFunction(org.apache.commons.math3.analysis.MultivariateFunction) LUT(ij.process.LUT) FrcCurve(uk.ac.sussex.gdsc.smlm.ij.frc.Frc.FrcCurve) PrecisionResultProcedure(uk.ac.sussex.gdsc.smlm.results.procedures.PrecisionResultProcedure) Rectangle(java.awt.Rectangle) SearchInterval(org.apache.commons.math3.optim.univariate.SearchInterval) WindowOrganiser(uk.ac.sussex.gdsc.core.ij.plugin.WindowOrganiser) AtomicReference(java.util.concurrent.atomic.AtomicReference) TrackProgress(uk.ac.sussex.gdsc.core.logging.TrackProgress) TextField(java.awt.TextField) AWTEvent(java.awt.AWTEvent) ImagePeakResultsFactory(uk.ac.sussex.gdsc.smlm.ij.results.ImagePeakResultsFactory) InitialGuess(org.apache.commons.math3.optim.InitialGuess) UnitHelper(uk.ac.sussex.gdsc.smlm.data.config.UnitHelper) LinkedList(java.util.LinkedList) Statistics(uk.ac.sussex.gdsc.core.utils.Statistics) ExecutorService(java.util.concurrent.ExecutorService) DialogListener(ij.gui.DialogListener) ConversionException(uk.ac.sussex.gdsc.core.data.utils.ConversionException) Checkbox(java.awt.Checkbox) StdMath(uk.ac.sussex.gdsc.smlm.utils.StdMath) ResultsImageMode(uk.ac.sussex.gdsc.smlm.data.config.ResultsProtos.ResultsImageMode) LutColour(uk.ac.sussex.gdsc.core.ij.process.LutHelper.LutColour) Recorder(ij.plugin.frame.Recorder) WeightedObservedPoints(org.apache.commons.math3.fitting.WeightedObservedPoints) BrentOptimizer(org.apache.commons.math3.optim.univariate.BrentOptimizer) CalibrationReader(uk.ac.sussex.gdsc.smlm.data.config.CalibrationReader) Counter(uk.ac.sussex.gdsc.smlm.results.count.Counter) HistogramPlot(uk.ac.sussex.gdsc.core.ij.HistogramPlot) ImageJUtils(uk.ac.sussex.gdsc.core.ij.ImageJUtils) IJ(ij.IJ) LocalList(uk.ac.sussex.gdsc.core.utils.LocalList) UniformRandomProviders(uk.ac.sussex.gdsc.core.utils.rng.UniformRandomProviders) Rectangle(java.awt.Rectangle) ResultsImageSettings(uk.ac.sussex.gdsc.smlm.data.config.ResultsProtos.ResultsImageSettings) ImageJImagePeakResults(uk.ac.sussex.gdsc.smlm.ij.results.ImageJImagePeakResults) WeightedObservedPoint(org.apache.commons.math3.fitting.WeightedObservedPoint) PeakResult(uk.ac.sussex.gdsc.smlm.results.PeakResult) ImageProcessor(ij.process.ImageProcessor) Counter(uk.ac.sussex.gdsc.smlm.results.count.Counter)

Aggregations

ImageJImagePeakResults (uk.ac.sussex.gdsc.smlm.ij.results.ImageJImagePeakResults)12 ResultsImageSettings (uk.ac.sussex.gdsc.smlm.data.config.ResultsProtos.ResultsImageSettings)5 MemoryPeakResults (uk.ac.sussex.gdsc.smlm.results.MemoryPeakResults)5 ImageProcessor (ij.process.ImageProcessor)4 Rectangle (java.awt.Rectangle)4 UniformRandomProvider (org.apache.commons.rng.UniformRandomProvider)3 ImagePlus (ij.ImagePlus)2 FloatProcessor (ij.process.FloatProcessor)2 SharedStateContinuousSampler (org.apache.commons.rng.sampling.distribution.SharedStateContinuousSampler)2 PeakResult (uk.ac.sussex.gdsc.smlm.results.PeakResult)2 PeakResults (uk.ac.sussex.gdsc.smlm.results.PeakResults)2 SeededTest (uk.ac.sussex.gdsc.test.junit5.SeededTest)2 AtomicDouble (com.google.common.util.concurrent.AtomicDouble)1 TDoubleArrayList (gnu.trove.list.array.TDoubleArrayList)1 IJ (ij.IJ)1 Macro (ij.Macro)1 Prefs (ij.Prefs)1 WindowManager (ij.WindowManager)1 DialogListener (ij.gui.DialogListener)1 GenericDialog (ij.gui.GenericDialog)1