use of net.imglib2.type.numeric.ARGBDoubleType in project imagej-ops by imagej.
the class AddNumericTypeBinaryMathAddTest method testAdd.
@Test
public void testAdd() {
final ARGBDoubleType a = new ARGBDoubleType(255, 128, 128, 128);
final ARGBDoubleType b = new ARGBDoubleType(255, 75, 35, 45);
final Op op = ops.op(Ops.Math.Add.class, a, a, b);
assertSame(NumericTypeBinaryMath.Add.class, op.getClass());
op.run();
assertEquals(203.0, a.getR(), DELTA);
assertEquals(163.0, a.getG(), DELTA);
assertEquals(173.0, a.getB(), DELTA);
}
Aggregations