use of net.imglib2.type.numeric.integer.ByteType in project imagej-ops by imagej.
the class LocalThresholdTest method testLocalSauvolaIntegral.
/**
* @see LocalSauvolaThresholdIntegral
*/
@Test
public void testLocalSauvolaIntegral() {
ops.run(LocalSauvolaThresholdIntegral.class, out, in, new RectangleShape(2, false), new OutOfBoundsMirrorFactory<ByteType, Img<ByteType>>(Boundary.SINGLE), 0.5, 0.5);
assertEquals(false, out.firstElement().get());
}
use of net.imglib2.type.numeric.integer.ByteType in project imagej-ops by imagej.
the class LocalThresholdTest method testLocalBernsenThreshold.
/**
* @see LocalBernsenThreshold
*/
@Test
public void testLocalBernsenThreshold() {
ops.run(LocalBernsenThreshold.class, out, in, new RectangleShape(3, false), new OutOfBoundsMirrorFactory<ByteType, Img<ByteType>>(Boundary.SINGLE), 1.0, Double.MAX_VALUE * 0.5);
assertEquals(true, out.firstElement().get());
}
use of net.imglib2.type.numeric.integer.ByteType in project imagej-ops by imagej.
the class LocalThresholdTest method testLocalThresholdMean.
/**
* @see LocalMeanThreshold
*/
@Test
public void testLocalThresholdMean() {
ops.run(LocalMeanThreshold.class, out, in, new RectangleShape(1, false), new OutOfBoundsMirrorFactory<ByteType, Img<ByteType>>(Boundary.SINGLE), 0.0);
assertEquals(true, out.firstElement().get());
}
use of net.imglib2.type.numeric.integer.ByteType in project imagej-ops by imagej.
the class LocalThresholdTest method testLocalRosinThreshold.
/**
* @see LocalRosinThreshold
*/
@Test
public void testLocalRosinThreshold() {
ops.run(Rosin.class, out, in, new RectangleShape(1, false), new OutOfBoundsMirrorFactory<ByteType, Img<ByteType>>(Boundary.SINGLE));
assertEquals(false, out.firstElement().get());
}
use of net.imglib2.type.numeric.integer.ByteType in project imagej-ops by imagej.
the class BlackTopHatTest method testSingleBlackTopHat.
@Test
public void testSingleBlackTopHat() {
final Shape shape = new DiamondShape(1);
final List<Shape> shapes = Arrays.asList(shape);
@SuppressWarnings("unchecked") final Img<ByteType> out1 = (Img<ByteType>) ops.run(ListBlackTopHat.class, Img.class, in, shapes);
final Img<ByteType> out2 = BlackTopHat.blackTopHat(in, shape, 1);
assertIterationsEqual(out2, out1);
}
Aggregations