Compiling ImageJ2 for Dummies somewhere

Hi all,

is there any step by step tutorial how to compile/build ImageJ2 in Eclipse for those how can write IJ1 plugins but never worked with maven or such? There is one for ImageJ1 which worked fine:

http://imagejdocu.tudor.lu/doku.php?id=howto:plugins:the_imagej_eclipse_howto

With ImageJ2’s complexity it seems not be possible anymore to just edit a IJ2 java file, use ‘compile and run’ and then change the class file in the corresponding jar.

Thanks,
Stefan

The link you posted is specific to ImageJ 1.x.

Current documentation relating to ImageJ2 and Fiji is on the http://imagej.net/ wiki:

If you only want to develop a plugin (as opposed to contributing to ImageJ2 core development), the best place to start is to git clone one of the tutorial repositories and import the maven projects in Eclipse:

1 Like

Thanks, Jan. I made the mistake searching for ImageJ2 and Eclipse. I’ll follow the developing ImageJ in Eclipse documentation and see if I can make that work. I do both, writing plugins and customizing the user interface which is much more difficult in IJ2 than IJ1. I need a “lean” interface, basically the opposite of fiji.

Again, thanks for the links,
Stefan

If you just mean you want fewer menu commands, then it is enough to remove the unneeded JAR files from your class-path.

If you need to tailor the UI in other ways, the SciJava UI framework provides a starting point for creating alternative UI plugins however you like. Just extend org.scijava.ui.AbstractUserInterface (or org.scijava.ui.swing.AbstractSwingUI if you are building a Swing-based UI) and annotate the plugin with @Plugin(type = UserInterface.class).

Here are a couple of examples:

  • Swing SDI – Swing-based UI closely modeled after ImageJ 1.x
  • Legacy – UI plugin which wraps the ImageJ 1.x user interface; this is what ImageJ2 & Fiji currently use by default

And some other rudimentary/unfinished examples:

I wish I had time to finish them, but there are too many other priorities to worry about UIs for the time being.

Lastly, there is also a JavaFX-based interface for ImageJ2 called ImageJFX, currently in alpha, developed by @cmongis. But I believe that interface is not structured as a SciJava UI plugin.

2 Likes

fewer menu commands

In theory, yes, but I also want to get rid of the separator below “Quit” which is not generated by IJ1, and inject the “switch to modern” help menu entry somewhere else. Yesterday I tested building imagej following the link above which was amazingly simple. Very cool, so I can focus on my changes then on actually USING that beautiful software again.

(I checked FX before to solve the high DPI issue, but it is too fancy. Better IJ2+JDK8 which work well on high DPI screens)

Thanks for all,
Stefan

1 Like