Skip to content
ImageJ programming examples
Branch: master
Clone or download


This project contains example code for working with ImageJ and SciJava.


The easiest way to get started with the ImageJ and SciJava APIs is via the ImageJ Jupyter notebooks, located in the notebooks subfolder of this repository.

The introductory notebooks use the Groovy kernel from BeakerX. Several other JVM-based kernels are usable as well, including Clojure, Java, Kotlin and Scala.

There are also notebooks using the standard Python kernel plus the pyimagej package, enabling use of ImageJ from Python programs.

There is more than one way to install Jupyter, but here is the procedure we recommend to get started quickly:

  1. Install Miniconda.
  2. Clone this imagej/tutorials repository.
  3. Open a console and cd to your cloned working copy.
  4. conda env create -f environment.yml to create a conda environment with the dependencies these notebooks need.
  5. source activate scijava (or activate scijava on Windows) to activate the environment.
  6. jupyter notebook to launch Jupyter Notebook in a web browser window.
  7. In the browser, click into notebooks, then click on the ImageJ-Tutorials-and-Demo.ipynb notebook to open it.

Learn more about Jupyter Notebook on its web site.


For the type-safety-inclined, this repository also contains Maven projects written in Java. You can import these projects into your favorite IDE:

  • Eclipse: File > Import > Existing Maven Projects
  • NetBeans: File > Open Project
  • IDEA: File > Open Project... (select pom.xml)

Or build and run from the command line:

cd maven-projects/simple-commands
mvn -Pexec -Dmain-class=GradientImage


To the extent possible under law, the ImageJ developers have waived all copyright and related or neighboring rights to this tutorial code.

See the CC0 1.0 Universal license for details.


You can’t perform that action at this time.