public class DefaultEquation<T extends RealType<T>> extends AbstractUnaryHybridCF<String,IterableInterval<T>> implements EquationOp<T>
The equation is evaluated using Javascript. The image's position coordinates
are available to the equation via the p
array; e.g.:
Math.cos(0.1*p[0]) + Math.sin(0.1*p[1])
.
Note that this op is rather slow; it is intended mainly for demonstration purposes, and to easily generate small images for testing Ops workflows.
SpecialOp.Flavor
NAME
Constructor and Description |
---|
DefaultEquation() |
Modifier and Type | Method and Description |
---|---|
void |
compute(String input,
IterableInterval<T> output)
Computes the output given some input.
|
IterableInterval<T> |
createOutput(String input)
Create an output object given some input.
|
in, out, setInput, setOutput
ops, setEnvironment
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compute, getIndependentInstance, run, run
in, setInput
run
candidates, filterArity, op
ops, setEnvironment
initialize
setOutput
calculate, calculate, createOutput, getIndependentInstance, run, run
run
public void compute(String input, IterableInterval<T> output)
UnaryComputerOp
compute
in interface UnaryComputerOp<String,IterableInterval<T extends RealType<T>>>
input
- Argument to the computation, which must be non-nulloutput
- Object where the computation's result will be stored, which
must be non-null and a different object than input
public IterableInterval<T> createOutput(String input)
UnaryOutputFactory
createOutput
in interface UnaryOutputFactory<String,IterableInterval<T extends RealType<T>>>
input
- which determines how to create the outputCopyright © 2014–2022 ImageJ. All rights reserved.