Difference between revisions of "Extensibility"

(Let's not pretend that we forked SezPoz (we did not: our annotation processor is a rewrite from scratch))
(Let's not be shy about our accomplishments)
Line 1: Line 1:
{{Development}}{{Sidebox | title = How does it work? | text = We use an [https://en.wikipedia.org/wiki/Java_annotation#Processing annotation processor] at compile time (inspired by the [https://github.com/jglick/sezpoz SezPoz] project) which writes the plugin metadata to a special file inside the JAR file: <code>META-INF/json/org.scijava.plugin.Plugin</code>. Reading these files allows the system to discover Java annotations at runtime very quickly ''without'' loading the plugin classes in advance.}}Extensibility is [[ImageJ]]'s greatest strength. [[ImageJ2]] has an powerful plugin discovery mechanism, driven by the [[SciJava Common]] library, that finds all plugins available on the Java classpath, without knowing in advance what they are or where they are located.
+
{{Development}}{{Sidebox | title = How does it work? | text = We use an [https://en.wikipedia.org/wiki/Java_annotation#Processing annotation processor] at compile time (inspired by the [https://github.com/jglick/sezpoz SezPoz] project) which writes the plugin metadata to a special file inside the JAR file: <code>META-INF/json/org.scijava.plugin.Plugin</code>. Reading these files allows the system to discover Java annotations at runtime very quickly ''without'' loading the plugin classes in advance.}}Extensibility is [[ImageJ]]'s greatest strength. [[ImageJ2]] enhances upon this in several ways: it adds strong typing of plugins, it makes extensive use of plugins itself (allowing core functionality to be customized easily) and it has an powerful plugin discovery mechanism, driven by the [[SciJava Common]] library, that finds all plugins available on the Java classpath, without knowing in advance what they are or where they are located.
  
 
ImageJ2 provides several different types of plugins. It is even possible to extend the system with your own new types of plugins.
 
ImageJ2 provides several different types of plugins. It is even possible to extend the system with your own new types of plugins.

Revision as of 04:54, 3 November 2014

Template:DevelopmentTemplate:SideboxExtensibility is ImageJ's greatest strength. ImageJ2 enhances upon this in several ways: it adds strong typing of plugins, it makes extensive use of plugins itself (allowing core functionality to be customized easily) and it has an powerful plugin discovery mechanism, driven by the SciJava Common library, that finds all plugins available on the Java classpath, without knowing in advance what they are or where they are located.

ImageJ2 provides several different types of plugins. It is even possible to extend the system with your own new types of plugins.

Commands

The most familiar sort of plugin is the command, which is a runnable operation. Most commands can be written in a manner completely independent of the user interface. You define the command's inputs and outputs by labeling them with the @Parameter annotation. ImageJ automatically takes care of filling in the inputs (typically by prompting the user for input using a dialog box), as well as displaying the outputs after the command has run.

You can find some example commands in the ImageJ tutorials.

See also