Skip to main content

Source code

You can check out the ImageJ source code from SVN:

svn co http://code.imagej.net/svn/imagej/trunk imagej

Or from the Git mirror:

git clone git://code.imagej.net/imagej.git

Building from source: Install Maven and type "mvn" from the top-level directory.

Using an IDE: You can import the code into your favorite IDE.

Javadocs: You can browse the Javadocs for ImageJ2 and ImgLib2 online.

Linking ImageJ 1.x source

If you want to link to the ImageJ v1.x source code, you can also check out the IJ1 code from the ImageJA Git repository as follows:

git clone git://code.imagej.net/imageja.git

A Maven project is provided, which you can import into your favorite IDE.

Running ImageJ 1.x unit tests

We have written a substantial number of unit tests to exercise ImageJ 1.x functionality. You can find them in the ij1-tests project.

You can run the unit tests from the command line:

cd ij1-tests
mvn

Or from Eclipse:

  1. Import the ij1-tests project using File > Import Existing Maven Projects and choosing the ij1-tests/pom.xml file.
  2. Right-click the ij1-tests project, Run As > JUnit Test.

You can change which version of ImageJ is tested by editing the ij1-tests/pom.xml file. Change the line:

<version>${imagej1.version}</version>

To:

<version>1.45q</version>

Or whichever version you wish to use (of those listed here). The unit tests were created circa 1.44, and do not compile correctly with earlier versions of ImageJ.

If running tests on the command line, you may wish to run "mvn clean" prior to "mvn" in order to recompile the tests against the chosen version. This verifies the version's compile-time compatibility with the tests.