use of net.imagej.ops.coloc.pValue.PValueResult in project imagej-ops by imagej.
the class LiICQTest method testPValue.
/**
* Checks calculated pValue for Li's ICQ.
*/
@Test
public void testPValue() {
final double mean = 0.2;
final double spread = 0.1;
final double[] sigma = new double[] { 3.0, 3.0 };
Img<FloatType> ch1 = ColocalisationTest.produceMeanBasedNoiseImage(new FloatType(), 24, 24, mean, spread, sigma, 0x01234567);
Img<FloatType> ch2 = ColocalisationTest.produceMeanBasedNoiseImage(new FloatType(), 24, 24, mean, spread, sigma, 0x98765432);
BinaryFunctionOp<RandomAccessibleInterval<FloatType>, RandomAccessibleInterval<FloatType>, Double> op = Functions.binary(ops, LiICQ.class, Double.class, ch1, ch2);
PValueResult value = (PValueResult) ops.run(DefaultPValue.class, new PValueResult(), ch1, ch2, op);
assertEquals(0.786, value.getPValue(), 0.0);
}
use of net.imagej.ops.coloc.pValue.PValueResult in project imagej-ops by imagej.
the class KendallTauBRankTest method testPValue.
@Test
public void testPValue() {
final double mean = 0.2;
final double spread = 0.1;
final double[] sigma = new double[] { 3.0, 3.0 };
Img<FloatType> ch1 = ColocalisationTest.produceMeanBasedNoiseImage(new FloatType(), 24, 24, mean, spread, sigma, 0x01234567);
Img<FloatType> ch2 = ColocalisationTest.produceMeanBasedNoiseImage(new FloatType(), 24, 24, mean, spread, sigma, 0x98765432);
BinaryFunctionOp<RandomAccessibleInterval<FloatType>, RandomAccessibleInterval<FloatType>, Double> op = Functions.binary(ops, KendallTauBRank.class, Double.class, ch1, ch2);
PValueResult value = (PValueResult) ops.run(DefaultPValue.class, new PValueResult(), ch1, ch2, op);
assertEquals(0.813, value.getPValue(), 0.0);
}
use of net.imagej.ops.coloc.pValue.PValueResult in project imagej-ops by imagej.
the class DefaultPearsonsTest method testPValue.
@Test
public void testPValue() {
final double mean = 0.2;
final double spread = 0.1;
final double[] sigma = new double[] { 3.0, 3.0 };
Img<FloatType> ch1 = ColocalisationTest.produceMeanBasedNoiseImage(new FloatType(), 24, 24, mean, spread, sigma, 0x01234567);
Img<FloatType> ch2 = ColocalisationTest.produceMeanBasedNoiseImage(new FloatType(), 24, 24, mean, spread, sigma, 0x98765432);
BinaryFunctionOp<RandomAccessibleInterval<FloatType>, RandomAccessibleInterval<FloatType>, Double> op = Functions.binary(ops, Ops.Coloc.Pearsons.class, Double.class, ch1, ch2);
PValueResult value = (PValueResult) ops.run(Ops.Coloc.PValue.class, new PValueResult(), ch1, ch2, op);
assertEquals(0.724, value.getPValue(), 0.0);
}
Aggregations