Search in sources :

Example 1 with SplitMix64

use of org.apache.commons.rng.core.source64.SplitMix64 in project GDSC-SMLM by aherbert.

the class PcPalmAnalysis method createMaskDistribution.

private static MaskDistribution createMaskDistribution(ImageProcessor ip, double roix, double roiy) {
    // Calculate the scale of the mask
    final int w = ip.getWidth();
    final int h = ip.getHeight();
    final double scaleX = roix / w;
    final double scaleY = roiy / h;
    // Use an image for the distribution.
    // Note: The sampling functionality of the MaskDistribution is not used but it requires
    // a RNG so create one.
    final int[] mask = extractMask(ip);
    return new MaskDistribution(mask, w, h, 0, scaleX, scaleY, new SplitMix64(0L));
}
Also used : MaskDistribution(uk.ac.sussex.gdsc.smlm.model.MaskDistribution) SplitMix64(org.apache.commons.rng.core.source64.SplitMix64)

Aggregations

SplitMix64 (org.apache.commons.rng.core.source64.SplitMix64)1 MaskDistribution (uk.ac.sussex.gdsc.smlm.model.MaskDistribution)1