Search in sources :

Example 1 with Sqrt

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);
    }
}
Also used : Ops(net.imagej.ops.Ops) Sqr(net.imagej.ops.Ops.Math.Sqr) Sqrt(net.imagej.ops.Ops.Math.Sqrt)

Aggregations

Ops (net.imagej.ops.Ops)1 Sqr (net.imagej.ops.Ops.Math.Sqr)1 Sqrt (net.imagej.ops.Ops.Math.Sqrt)1