Downloading and Building Fiji From Source

QR for this page

From Fiji

Jump to: navigation, search
Source code
Project management
Coding style
Writing plugins
Contributing to a plugin
Distributing your plugins
Development lifecycle
Adding new ops
Adding new formats
Using native libraries
ImageJ 1.x plugins
Building Fiji from source
Developing Fiji
Fiji + Eclipse
Contribution requirements
Supported compilers

The complete Fiji distribution of ImageJ consists of over a hundred individual components. Most of these components are ImageJ plugins; the rest are core libraries, scripts, the ImageJ launcher and several other resources (such as the Fiji logo and the README).

In the past, Fiji used to be built from one monolithic source code repository, which became unmanageable over the time. These days, therefore, developers start from a fully-populated directory and build only the parts they would like to change.

Download Fiji

The first step is the same for developers as it is for users: Download Fiji, and unpack it. The Desktop is the recommended location.

Check out and build individual plugins/libraries

To develop a plugin, the developer first needs to find out in which file it is contained. To do that, simply call the Command Finder (shortcut ^ Ctrl+L), type (part of) the label of the menu entry in whose function you are interested, and look at the File column.

Each individual component is maintained in its own repository in the fiji org on GitHub. The name of the repository corresponding to a given .jar file is essentially identical with the file name, except that trailing underscores are stripped. Example: Stitching_.jar is maintained in the repository at, Time_Lapse.jar in the repository at

If in doubt about the location of the repository, just call Plugins  ▶ Debug  ▶ System Information and find the section corresponding to the file in question.

Once the developer has identified which plugin or library she wants to modify or develop further, it is very easy to build and contribute by following this tutorial.


Let's assume that we want to develop the Skeletonize3D plugin. Its source code is maintained at The first step is to clone the source code:

$ git clone
Cloning into 'Skeletonize3D'...
remote: Counting objects: 115, done.
remote: Compressing objects: 100% (58/58), done.
remote: Total 115 (delta 46), reused 115 (delta 46)
Receiving objects: 100% (115/115), 22.81 KiB | 0 bytes/s, done.
Resolving deltas: 100% (46/46), done.
Checking connectivity... done.

You only need to type the part after the $ prompt, i.e you would type git clone The rest is shown only for reference, so that you know what to expect.

Then let's use the command-line Maven to build the project:

$ cd Skeletonize3D/
$ mvn
[INFO] Scanning for projects...
[... lots and lots of interesting and useful information ...]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 52.574s
[INFO] Finished at: Tue Dec 02 10:27:00 CET 2014
[INFO] Final Memory: 20M/81M
[INFO] ------------------------------------------------------------------------

And finally, let's build the project and install it into the directory:

$ mvn$HOME/Desktop/ -Ddelete.other.versions=true
[INFO] Scanning for projects...
[... lots and lots of interesting and useful information ...]
[INFO] --- imagej-maven-plugin:0.5.4:copy-jars (copy-jars) @ Skeletonize3D_ ---
[INFO] Copying Skeletonize3D_-1.0.2-SNAPSHOT.jar to $HOME/Desktop/
[INFO] Deleted overridden Skeletonize3D_-1.0.1.jar
[INFO] Copying ij-1.49j.jar to $HOME/Desktop/
[INFO] Deleted overridden ij-1.49m.jar
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.331s
[INFO] Finished at: Tue Dec 02 10:30:02 CET 2014
[INFO] Final Memory: 14M/81M
[INFO] ------------------------------------------------------------------------

Of course, this assumes that you followed the suggestion and unpacked your Fiji onto the Desktop. If you unpacked it somewhere else, you have to adjust the command-line accordingly.

Note that the exact dependency versions, as specified by the project in the pom.xml file, are copied into the directory, possibly replacing other versions. You will want to make sure to use not-too-different versions from the current versions.