This example contains the code required to create a custom MIA module.
Two example modules are provided:
- "ExampleModule.java" is a full, working example module which performs a variety of operations that a module may use. These include loading images and objects from the workspace, creating new images and objects, assigning relationships between objects and creating new measurements.
- "TemplateModule.java" contains the minimum content required to create a Module, but itself doesn't perform any operations. This file can be used as a basis for any new modules.
For the purpose of testing, a MIA workflow file ("DevEx1_CustomModules.mia") and example image ("DevEx1_ImageAndNuclei.tif") are provided which work with the example module. To launch a copy of MIA with access to "ExampleModule", the main method in ExampleModule.java can be run.
In MIA, each operation in a workflow is performed by a self-contained module which performs a specific task. Examples include image loading, application of image filters, detection of objects, calculation of measurements and visualisation of results. For a complete list of modules currently-available in MIA, please see https://mianalysis.github.io/modules.
Each module has access to all images, objects and measurements previously generated by modules earlier in the workflow. Since MIA uses a common object format across all modules, any objects exported by a module will be supported by any downstream modules.
The main MIA documentation can be found at https://mianalysis.github.io and the JavaDoc for MIA is available here.
MIA can be added to Maven projects using the following dependencies:
<dependency>
<groupId>io.github.mianalysis</groupId>
<artifactId>mia-core</artifactId>
<version>1.5.1</version>
</dependency>
<dependency>
<groupId>io.github.mianalysis</groupId>
<artifactId>mia-modules</artifactId>
<version>1.5.1</version>
</dependency>
<dependency>
<groupId>io.github.mianalysis</groupId>
<artifactId>mia-plugin</artifactId>
<version>1.5.1</version>
</dependency>
Under normal operation, custom modules can be added to MIA via two different routes:
- Via a pull request on the MIA repository (https://github.com/mianalysis/mia). This will add the module to the main MIA distribution available from the ImageJ Updater.
- As a standalone .jar file added to the "plugins" folder of a copy of Fiji. This will be automatically detected when MIA launches and included in the list of available modules.