Johannes Schindelin, Christian Dietz & Curtis Rueden
public interface Greeter extends SciJavaPlugin {
public String sayHello();
}
@Plugin(type = Greeter.class)
public class HelloWorld implements Greeter {
@Override
public String sayHello() {
return "Hello, world!";
}
}
# @ImageJ ij
blank = ij.op().createImg(150, 100)
formula = "10 * (Math.cos(0.3*p[0]) + Math.sin(0.3*p[1]))"
sinusoid = ij.op().equation(blank, formula)
ij.op().add(sinusoid, 13.0)
gradient = ij.op().equation(ij.op().createImg(150, 100), "p[0]+p[1]")
composite = ij.op().createImg(150, 100)
ij.op().add(composite, sinusoid, gradient)
ij.ui().show("sinusoid", sinusoid)
ij.ui().show("gradient", gradient)
ij.ui().show("composite", composite)
Note: Due to heavy development, this code does not currently work in Fiji.
@Plugin(type = Op.class, name = "narf")
public static class Narf implements Op {
@Parameter(type = ItemIO.BOTH)
private String string;
@Override
public void run() {
string = "Egads! " + string.toUpperCase();
}
}
Of course! Thanks to ImgLib2!