ImageJ Tutorials and Demo

Welcome to the ImageJ tutorial series. These notebooks offer a hands-on series of lessons for learning ImageJ.

Feedback is very welcome! Please share your ideas on the Image.sc Forum!

Advanced extensions

  1. Creating a custom service (coming later)
  2. Customizing module execution (coming later)
  3. Creating a SCIFIO plugin (coming later)

ImageJ Demo

First, we tell the notebook to download and install ImageJ from the remote repository.

In [1]:
%classpath config resolver scijava.public https://maven.scijava.org/content/groups/public
%%classpath add mvn
net.imagej imagej 2.0.0-rc-71
net.imagej imagej-notebook 0.7.1
Added new repo: scijava.public

Now that ImageJ functionality is available to the notebook, we create an ImageJ gateway.

In [2]:
ij = new net.imagej.ImageJ()
"ImageJ v${ij.getVersion()} is ready to go."
Out[2]:
ImageJ v2.0.0-rc-71 is ready to go.

For further details, see the Fundamentals of ImageJ notebook.

Load an image

You can open images from local files as well as remote URLs.

In [3]:
image = ij.io().open("https://imagej.net/images/lymp.tif")
Out[3]:

Compute histogram

In [4]:
histogram = ij.op().image().histogram(image)
Out[4]:
Histogram

N-dimensional crop

In [5]:
mandrill = ij.io().open("https://imagej.net/images/baboon.jpg")
[INFO] Populating metadata
[INFO] Populating metadata
Out[5]: