Installing 3rd party plugins

Revision as of 08:25, 7 June 2010 by Eglinger (talk | contribs) (Categorized: Tutorials)

For users

  • Use Plugins>Install Plugin...:
It will ask you for the file name of the plugin, and install the given file.
  • Alternatively, you can just drag 'n drop the plugin .jar file in the plugins directory:
This will ask you for the destination of the plugin, just hitting Save is safe.

For developers

Please try to avoid closed-source plugins.

If you have the sources, copy them into src-plugins/. (If you do not have the sources, copy the .jar into staged-plugins/.)

Then, add a .config file in staged-plugins/ and type "./". The plugin will be compiled and installed into plugins/.

Longer version:

The .config file should look something like this:

       File, "Show Prime Numbers", Primes_("")

where "File" is the menu you want to add the item to -- at the moment, the only valid choices are "Plugins", "Plugins><submenu>", "File>Import", "File>Save", "Analyze>Tools", "Help>About" and "Edit>Options".

Next comes the title of the menu item, and lastly the class name of the plugin with a parameter that will be passed to the run() method of that class. It must a fully qualified java name (e.g. if the plugin belongs to a java package.

In other words, the .config file will become the plugins.config of the .jar file.

Please make sure that your .config file is designed such that the menus fit in snuggly with the common Fiji menu structure.

Then just "make", and the plugin will be automatically installed.

Installing new readers/writers into io package

I recently added a couple of new IO plugins that were previously developed as standalone ImageJ plugins as follows:

Add all source code (*.java) files to:


add the following to the top of each source code file

 package io;

Then edit staged-plugins/IO_.config to add menu items e.g.

 File>Import, "Nrrd ...", io.Nrrd_Reader
 File>Save As, "Nrrd ... ", io.Nrrd_Writer

Finally add a new handle in


to recognise images of the relevant type and call the plugin.