The ImageJ OPS framework

Image Processing Made Easy

Johannes Schindelin, Christian Dietz & Curtis Rueden

What's the problem?

  • image processing consists of a pipeline
  • each pipeline consists of operations
  • many users find it complicated to build pipelines for their tasks

Options for image processing and analysis:

  • easy-to-use applications for most common operations
  • extensions (modules, plugins)
  • scripting

Wouldn't it be nice if we had something...

  • easy to use, to extend and to maintain?
  • that handles large amounts of data?
  • that is blazing fast?
  • We have a community!
  • We have experience with collaborative development!
  • We have the SciJava framework and ImgLib2!

A little excursion

The SciJava framework

  • Reuse
  • Extend
  • Be empowered!

Defining a plugin type

						
public interface Greeter extends SciJavaPlugin {
	public String sayHello();
}
						
						

Implementing a plugin type

						
@Plugin(type = Greeter.class)
public class HelloWorld implements Greeter {
	@Override
	public String sayHello() {
	        return "Hello, world!";
	}
}
						
						

Easy to use

							
# @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.

Easy to extend

							
@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();
	}
}
							
						

Large data

Of course! Thanks to ImgLib2!

Fast?

  • Well, yes! (The trick is code generation...)
  • What about CUDA (GPU computing)? ... SciJava plugins!
  • Balancing development time vs execution time
    Compare xkcd: Is It Worth the Time?

Status: alpha

Thanks!

  • The ImgLib2 developers
    (Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, Barry DeZonia, Curtis Rueden, Albert Cardona, Jean-Yves Tinevez, ...)
  • The designers of ImageJ OPS' architecture
    (Curtis Rueden, Christian Dietz, Martin Horn, Michael Zinsmaier)
  • The visionaries funding hackathons:
    Pavel Tomancak, Kevin Eliceiri, Michael Berthold