use of net.imglib2.algorithm.neighborhood.RectangleShape 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.algorithm.neighborhood.RectangleShape 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.algorithm.neighborhood.RectangleShape 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.algorithm.neighborhood.RectangleShape 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.algorithm.neighborhood.RectangleShape in project imagej-ops by imagej.
the class ClosingTest method testListClose.
@Test
public void testListClose() {
final List<Shape> shapes = new ArrayList<>();
shapes.add(new DiamondShape(1));
shapes.add(new DiamondShape(1));
shapes.add(new RectangleShape(1, false));
shapes.add(new HorizontalLineShape(2, 1, false));
@SuppressWarnings("unchecked") final IterableInterval<ByteType> out1 = (IterableInterval<ByteType>) ops.run(ListClose.class, IterableInterval.class, in, shapes);
final Img<ByteType> out2 = Closing.close(in, shapes, 1);
assertIterationsEqual(out2, out1);
}
Aggregations