This project contains example code for working with ImageJ and SciJava.
Jupyter Notebooks are a great outreach tool to demonstrate how programs work interactively in real time. We use Jupyter for teaching ImageJ2 so that you can try and change the code yourself easily. See the Intro to Jupyter notebook if you have never used Jupyter notebook before.
There are multiple ways to run the Jupyter Notebooks:
Method | Pros | Cons | Running Live? |
---|---|---|---|
Local Environment |
Run code locally on your machine. | Must install developer tools. | Yes |
On GitHub | View notebooks quickly on GitHub's website. | Code does not run live; rendering is less complete & correct than on nbviewer. |
No |
Binder | Run code on the cloud, no local installation. | Slow to spin up the web container. | Yes |
Nbviewer | View notebooks nicely rendered on nbviewer.org. | Code does not run live; not integrated with GitHub. |
No |
- Install Miniconda.
- Clone this
imagej/tutorials
repository. - Open a console and
cd
to your cloned working copy. conda env create -f environment.yml
to create a conda environment with the dependencies these notebooks need.conda activate scijava
to activate the environment.jupyter notebook
to launch Jupyter Notebook in a web browser window.- In the browser, click into
notebooks
, then click on theImageJ-Tutorials-and-Demo.ipynb
notebook to open it.
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.
Use the "launch binder" badge above to try the Jupyter notebooks on the cloud using Binder, with no local installation necessary.
Note: Binder startup may take a minute
Use the "render nbviewer" badge above to access the Jupyter Notebooks on your machine through nbviewer.
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.
To the extent possible under law, the ImageJ developers have waived all copyright and related or neighboring rights to this tutorial code.
See unlicense.org for details.
- The Tutorials and Development sections of the ImageJ wiki.