use of net.imagej.ops.Ops.Math.Sqrt in project imagej-ops by imagej.
the class SobelRAI method initialize.
@SuppressWarnings("unchecked")
@Override
public void initialize() {
createRAI = RAIs.function(ops(), Ops.Create.Img.class, in());
Sqr squareOp = ops().op(Ops.Math.Sqr.class, RealType.class, RealType.class);
squareMapOp = RAIs.computer(ops(), Ops.Map.class, in(), squareOp);
Sqrt sqrtOp = ops().op(Ops.Math.Sqrt.class, RealType.class, RealType.class);
sqrtMapOp = RAIs.computer(ops(), Ops.Map.class, in(), sqrtOp);
addOp = RAIs.binaryComputer(ops(), Ops.Math.Add.class, in(), in());
derivativeComputers = new UnaryComputerOp[in().numDimensions()];
for (int i = 0; i < in().numDimensions(); i++) {
derivativeComputers[i] = RAIs.computer(ops(), Ops.Filter.PartialDerivative.class, in(), i);
}
}