SciJava is a collaboration of projects providing software for scientific computing—an effort to cooperate and reuse code when feasible.
The SciJava component collection
The following component layers are part of the SciJava component collection:
- SciJava - foundational layer unspecific to image processing, including the SciJava Common shared library with powerful plugin framework and application container, and plugins built on it.
- ImgLib2 - core libraries for N-dimensional image processing.
- SCIFIO - core libraries for N-dimensional image I/O.
- ImageJ2 - core libraries and application for N-dimensional image processing.
- Fiji - “batteries-included” distribution of ImageJ and ImageJ2, bundling a lot of plugins which facilitate scientific image analysis.
- BigDataViewer - re-slicing browser and Fiji plugin for terabyte-sized multi-view image sequences
- TrakEM2 - Fiji plugin suite for morphological data mining, three-dimensional modeling and image stitching, registration, editing and annotation.
- Bio-Formats - libraries and ImageJ plugins for life sciences image format I/O.
All components in this collection are managed by SciJava’s Bill of Materials to make it easier for downstream components to use them without version conflicts.
The SciJava pledge
The following projects are part of the SciJava pledge to work together, reuse code and synergize wherever possible:
SciJava Common is a common library for SciJava software. It provides a plugin framework, with an extensible mechanism for service discovery, backed by its own annotation processor, so that plugins can be loaded dynamically. It is used by both ImageJ2 and SCIFIO.
First and foremost, SciJava Common is a plugin framework—a base for developing highly modular and extensible Java applications.
All plugins available on Java’s classpath are automatically discovered and made available. This is accomplished by scanning classpath resources for the file path
META-INF/json/org.scijava.plugin.Plugin. Such files are generated at compile time by a Java annotation processor that writes them in response to
@Plugin annotations on Java classes, an idea inspired by the SezPoz project.
All program state, such as available plugins, is accessible from a root object known as the application context.
ImageJ2 encapsulates its various parts as separate “services” that provide related state functionality and track related program state. An instance of the net.imagej.ImageJ class is nothing more than a collection of these services; this instance is referred to as the “application gateway.” Services are defined as interfaces, with concrete implementations as plugins. This design provides seams in the right places so that behavior at every level can be customized and overridden.
Here are a few of SciJava Common’s major core services:
- AppService - Tracks software applications (SCIFIO, ImageJ2, etc.) present in the context.
- DisplayService - Tracks available displays, as well as the active display, and provides the means to create new displays to visualize data.
- EventService - Publishes events to the event bus, and allows interested parties to subscribe to them. The service provides the central means of communication between various parts of the codebase.
- IOService - General tools for opening and saving data within the context.
- MenuService - Builds the application menu structure.
- ModuleService - Tracks available modules, and provides the infrastructure for executing them.
- ObjectService - Tracks available objects of various types, including Datasets and Displays.
- OptionsService - Tools for managing program settings.
- PlatformService - Provides hooks for extending the application’s behavior depending on the deployment platform (operating system, version of Java, etc.).
- PluginService - Tracks available plugins, and provides the infrastructure for executing them (using the ModuleService).
- ScriptService - Provides utilities for running scripts and macros.
- StatusService - Publishes status updates for ongoing operations.
- ThreadService - Manages multithreading.
- ToolService - Tracks available tools—logic binding user input to behavior—as well as the active tool (selected on the toolbar).
- UIService - Discovers and launches a user interface for interacting with ImageJ.
Some of the services which ImageJ2 adds:
- DatasetService - Tools for creating and managing image data.
- ImageDisplayService - Similar to DisplayService, but specifically for ImageDisplays.
- OverlayService - Tools for creating and managing image overlays and regions of interest (ROIs).
SCIFIO provides several additional services—in particular:
- FormatService - Service for managing available image formats.
The SciJava menuing system is divided into several layers, to make it easier to override its behavior or customize its appearance in a user interface.
Each module known to the system (via the ModuleService can have a
menuPath that says where it should live (by default) in the menu. It also has a
menuRoot that says in which menu it should live, with the default being the
APPLICATION_MENU_ROOT, indicating the main application menu structure.
The MenuService takes care of constructing ShadowMenu tree structures for all available modules in the system, using their
menuRoot values. These tree structures are UI-agnostic. There is one
menuRoot, which can be requested at will from the
The UIService then takes care of constructing an actual UI-specific menu bar (or whatever UI components and/or widgets it wants) from the available
ShadowMenus. There is a type hierarchy beneath the MenuCreator interface intended for this purpose; for example, the SwingJMenuBarCreator implements
MenuCreator to create and maintain a Swing JMenuBar that reflects the state of a particular
How changes propagate
When modules are added, removed or changed (via ModulesAddedEvent, ModulesRemovedEvent, ModulesUpdatedEvent), the
MenuService listens and updates the associated
ShadowMenu(s) accordingly. It notifies interested parties that it has done so by firing a corresponding event: MenusAddedEvent, MenusRemovedEvent, or MenusUpdatedEvent.
API Version History
A history of API changes is available at: https://abi-laboratory.pro/java/tracker/timeline/scijava-common/