use of net.imglib2.type.numeric.integer.LongType in project imagej-ops by imagej.
the class InvertTest method testLongTypeInvert.
@Test
public void testLongTypeInvert() {
final Img<LongType> inLongType = generateLongArrayTestImg(true, 5, 5);
final Img<LongType> outLongType = inLongType.factory().create(inLongType, new LongType());
assertIntegerInvert(inLongType, outLongType);
assertIntegerInvertMinMaxProvided(inLongType, outLongType, new LongType(3025), new LongType(3846));
}
use of net.imglib2.type.numeric.integer.LongType in project imagej-ops by imagej.
the class UnaryRealTypeMathTest method testSec.
@Test
public void testSec() {
final LongType in = new LongType(1234567890);
final DoubleType out = new DoubleType();
ops.run(Sec.class, out, in);
assertEquals(out.get(), 1 / Math.cos(1234567890), 0.0);
}
use of net.imglib2.type.numeric.integer.LongType in project imagej-ops by imagej.
the class UnaryRealTypeMathTest method testArccosh.
@Test
public void testArccosh() {
final LongType in = new LongType(1234567890);
final DoubleType out = new DoubleType();
ops.run(Arccosh.class, out, in);
final double delta = Math.sqrt(1234567890.0 * 1234567890.0 - 1);
assertEquals(out.get(), Math.log(1234567890 + delta), 0.0);
}
use of net.imglib2.type.numeric.integer.LongType in project imagej-ops by imagej.
the class UnaryRealTypeMathTest method testCot.
@Test
public void testCot() {
final LongType in = new LongType(1234567890);
final DoubleType out = new DoubleType();
ops.run(Cot.class, out, in);
assertEquals(out.get(), 1 / Math.tan(1234567890), 0.0);
}
use of net.imglib2.type.numeric.integer.LongType in project imagej-ops by imagej.
the class UnaryRealTypeMathTest method testSin.
@Test
public void testSin() {
final LongType in = new LongType(1234567890);
final DoubleType out = new DoubleType();
ops.run(Sin.class, out, in);
assertEquals(out.get(), Math.sin(1234567890), 0.0);
}
Aggregations