diff --git a/DevelopmentExamples/DevEx1_CustomModule/README.md b/DevelopmentExamples/DevEx1_CustomModule/README.md
index e611766..0734fde 100644
--- a/DevelopmentExamples/DevEx1_CustomModule/README.md
+++ b/DevelopmentExamples/DevEx1_CustomModule/README.md
@@ -20,12 +20,24 @@ The main MIA documentation can be found at https://mianalysis.github.io and the
Adding MIA as a dependency
--------------------------
-MIA can be added to Maven projects using the following dependency:
+MIA can be added to Maven projects using the following dependencies:
```
io.github.mianalysis
- mia
- 1.2.10
+ mia-core
+ 1.5.1
+
+
+
+ io.github.mianalysis
+ mia-modules
+ 1.5.1
+
+
+
+ io.github.mianalysis
+ mia-plugin
+ 1.5.1
```
diff --git a/DevelopmentExamples/DevEx1_CustomModule/pom.xml b/DevelopmentExamples/DevEx1_CustomModule/pom.xml
index e061258..a00ba69 100644
--- a/DevelopmentExamples/DevEx1_CustomModule/pom.xml
+++ b/DevelopmentExamples/DevEx1_CustomModule/pom.xml
@@ -43,8 +43,20 @@
io.github.mianalysis
- mia
- 1.4.2
+ mia-core
+ 1.5.1
+
+
+
+ io.github.mianalysis
+ mia-modules
+ 1.5.1
+
+
+
+ io.github.mianalysis
+ mia-plugin
+ 1.5.1
diff --git a/DevelopmentExamples/DevEx1_CustomModule/src/main/java/io/github/mianalysis/example/ExampleModule.java b/DevelopmentExamples/DevEx1_CustomModule/src/main/java/io/github/mianalysis/example/ExampleModule.java
index c6ccd13..4ece9fb 100644
--- a/DevelopmentExamples/DevEx1_CustomModule/src/main/java/io/github/mianalysis/example/ExampleModule.java
+++ b/DevelopmentExamples/DevEx1_CustomModule/src/main/java/io/github/mianalysis/example/ExampleModule.java
@@ -44,6 +44,7 @@
import io.github.mianalysis.mia.process.ColourFactory;
import io.github.mianalysis.mia.process.math.CumStat;
import net.imagej.ImageJ;
+import net.imagej.patcher.LegacyInjector;
/**
* An example of a MIA Module.
@@ -115,11 +116,14 @@ public interface Measurements {
* @param args Can be left blank
*/
public static void main(String[] args) {
+ // The following must be called before initialising ImageJ
+ LegacyInjector.preinit();
+
// Creating a new instance of ImageJ
new ij.ImageJ();
// Launching MIA
- new ImageJ().command().run("io.github.mianalysis.mia.MIA", false);
+ new ImageJ().command().run("io.github.mianalysis.mia.MIA_", false);
// Adding the current module to MIA's list of available modules.
AvailableModules.addModuleName(ExampleModule.class);
@@ -218,7 +222,7 @@ public Status process(Workspace workspace) {
// Measuring intensity for each centroid object. Iterating over each output centroid object.
for (Obj outputObject : outputObjects.values()) {
// The MeasureObjectIntensity module has a public method that allows the intensity of a single object to be measured for a specified image. This returns a cumulative statistic (CumStat) object, from which we can extract statistics about the intensities of all coordinates in the specified object. Here, the object only has a single point, so mean, min, max and sum will all have the same value.
- CumStat cs = MeasureObjectIntensity.measureIntensity(outputObject, inputImage, false);
+ CumStat cs = MeasureObjectIntensity.measureIntensity(outputObject, inputImage, false, false);
// Creating a new "Measurement" object to store the intensity of the centroid object. As noted above, all statistics (bar the standard deviation) will have the same value, so the "mean" is used.
Measurement intensity = new Measurement(Measurements.INTENSITY, cs.getMean());
diff --git a/DevelopmentExamples/DevEx1_CustomModule/src/main/java/io/github/mianalysis/example/TemplateModule.java b/DevelopmentExamples/DevEx1_CustomModule/src/main/java/io/github/mianalysis/example/TemplateModule.java
index d803ae9..eeb54b3 100644
--- a/DevelopmentExamples/DevEx1_CustomModule/src/main/java/io/github/mianalysis/example/TemplateModule.java
+++ b/DevelopmentExamples/DevEx1_CustomModule/src/main/java/io/github/mianalysis/example/TemplateModule.java
@@ -17,30 +17,43 @@
import io.github.mianalysis.mia.object.refs.collections.PartnerRefs;
import io.github.mianalysis.mia.object.system.Status;
import net.imagej.ImageJ;
+import net.imagej.patcher.LegacyInjector;
/**
* A template MIA module.
- */
+ */
@Plugin(type = Module.class, priority = Priority.LOW, visible = true)
public class TemplateModule extends Module {
/**
- * (Optional) If we wish to put our new module into a different category to the default categories, we need to create it here. Leaving it till the {@link getCategory} method is called is too late. Here, we create a new module category called "Examples" which will be in the first level of the available modules list.
+ * (Optional) If we wish to put our new module into a different category to the
+ * default categories, we need to create it here. Leaving it till the
+ * {@link getCategory} method is called is too late. Here, we create a new
+ * module category called "Examples" which will be in the first level of the
+ * available modules list.
*/
private static final Category category = new Category("Examples", "Modules used in examples", Categories.ROOT,
true);
+
+
/**
- * (Optional) This main function allows us to launch a new copy of Image, start MIA and add the current module to MIA. These steps are only necessary when running the MIA and the new module from a main function. When run as part of distribution, the module will be automatically included in MIA.
+ * (Optional) This main function allows us to launch a new copy of Image, start
+ * MIA and add the current module to MIA. These steps are only necessary when
+ * running the MIA and the new module from a main function. When run as part of
+ * distribution, the module will be automatically included in MIA.
*
* @param args Can be left blank
*/
public static void main(String[] args) {
+ // The following must be called before initialising ImageJ
+ LegacyInjector.preinit();
+
// Creating a new instance of ImageJ
new ij.ImageJ();
// Launching MIA
- new ImageJ().command().run("io.github.mianalysis.mia.MIA", false);
+ new ImageJ().command().run("io.github.mianalysis.mia.MIA_", false);
// Adding the current module to MIA's list of available modules.
AvailableModules.addModuleName(TemplateModule.class);
@@ -59,7 +72,11 @@ public TemplateModule(Modules modules) {
}
/**
- * The module category within MIA in which this module will be placed. We can choose any of the default categories available in io.github.mianalysis.mia.module.Categories or use one created along with this module. This template uses the "Example" category created at the top of this class.
+ * The module category within MIA in which this module will be placed. We can
+ * choose any of the default categories available in
+ * io.github.mianalysis.mia.module.Categories or use one created along with this
+ * module. This template uses the "Example" category created at the top of this
+ * class.
*/
@Override
public Category getCategory() {
@@ -67,15 +84,25 @@ public Category getCategory() {
}
/**
- * Since MIA v1.4.0, each Module has been given a version number returned by this function. The intention is that these version numbers follow the standard semantic versioning format, where the numbers indicate changes in the form major.minor.patch. When loading a workflow, MIA checks the version number of a module against the version number of the module used to create the workflow. Based on any differences in version number, MIA will display a warning to users about the likelihood of results coming from that module being different.
+ * Since MIA v1.4.0, each Module has been given a version number returned by
+ * this function. The intention is that these version numbers follow the
+ * standard semantic versioning format, where the numbers indicate changes in
+ * the form major.minor.patch. When loading a workflow, MIA checks the version
+ * number of a module against the version number of the module used to create
+ * the workflow. Based on any differences in version number, MIA will display a
+ * warning to users about the likelihood of results coming from that module
+ * being different.
*/
@Override
public String getVersionNumber() {
return "1.0.0";
}
-
+
/**
- * Each module should include a description which will be included in the GUI (accessible by going to View / Show help panel) as well as in the automatically-generated online documentation at https://mianalysis.github.io/modules.
+ * Each module should include a description which will be included in the GUI
+ * (accessible by going to View / Show help panel) as well as in the
+ * automatically-generated online documentation at
+ * https://mianalysis.github.io/modules.
*/
@Override
public String getDescription() {
@@ -83,9 +110,13 @@ public String getDescription() {
}
/**
- * The method which is run as part of a workflow. This method contains all the code for loading items from the MIA workspace, performing the action of this module and exporting any new items to the workspace.
+ * The method which is run as part of a workflow. This method contains all the
+ * code for loading items from the MIA workspace, performing the action of this
+ * module and exporting any new items to the workspace.
*
- * @param workspace The current workspace containing all available images and objects (i.e. those previously output by earlier modules in the workflow).
+ * @param workspace The current workspace containing all available images and
+ * objects (i.e. those previously output by earlier modules in
+ * the workflow).
*/
@Override
public Status process(Workspace workspace) {
@@ -94,7 +125,10 @@ public Status process(Workspace workspace) {
}
/**
- * Creates an instance of each parameter, each of which is stored in the "parameters" variable of the module. Each new instance of the module will have a new set of parameters. This method runs once, when the module is first created.
+ * Creates an instance of each parameter, each of which is stored in the
+ * "parameters" variable of the module. Each new instance of the module will
+ * have a new set of parameters. This method runs once, when the module is first
+ * created.
*/
@Override
protected void initialiseParameters() {
@@ -102,7 +136,10 @@ protected void initialiseParameters() {
}
/**
- * Returns the currently-active parameters for this module. The returned parameters will change depending on what other parameters are set to. The output of this module determines the parameters that are displayed in the GUI.
+ * Returns the currently-active parameters for this module. The returned
+ * parameters will change depending on what other parameters are set to. The
+ * output of this module determines the parameters that are displayed in the
+ * GUI.
*/
@Override
public Parameters updateAndGetParameters() {
@@ -111,7 +148,12 @@ public Parameters updateAndGetParameters() {
}
/**
- * Measurements added to any images by this module are reported by adding their reference to an ImageMeasurementRefs collection. When no measurements are added by this module, this method can simply return "null". These references tell downstream modules what measurements are available for each image. Returned references should be the original copies stored in the local "imageMeasurementRefs" object.
+ * Measurements added to any images by this module are reported by adding their
+ * reference to an ImageMeasurementRefs collection. When no measurements are
+ * added by this module, this method can simply return "null". These references
+ * tell downstream modules what measurements are available for each image.
+ * Returned references should be the original copies stored in the local
+ * "imageMeasurementRefs" object.
*/
@Override
public ImageMeasurementRefs updateAndGetImageMeasurementRefs() {
@@ -119,16 +161,27 @@ public ImageMeasurementRefs updateAndGetImageMeasurementRefs() {
}
/**
- * Measurements added to any objects by this module are reported by adding their reference to an ObjMeasurementRefs collection. When no measurements are added by this module, this method can simply return "null". These references tell downstream modules what measurements are available for each object of a specific object collection. Returned references should be the original copies stored in the local "objectMeasurementRefs" object.
+ * Measurements added to any objects by this module are reported by adding their
+ * reference to an ObjMeasurementRefs collection. When no measurements are added
+ * by this module, this method can simply return "null". These references tell
+ * downstream modules what measurements are available for each object of a
+ * specific object collection. Returned references should be the original copies
+ * stored in the local "objectMeasurementRefs" object.
*/
@Override
public ObjMeasurementRefs updateAndGetObjectMeasurementRefs() {
- return null;
+ return null;
}
/**
- * Values added to the workspace's metadata collection by this module are reported by adding their reference to a MetadataRefs collection. When no metadata values are added by this module, this method can simply return "null". Metadata values are single values within a workspace that specify information such as the root filename or series number. These references tell downstream modules what metadata is available. Returned references should be the original copies stored in the local "metadataRefs" object.
+ * Values added to the workspace's metadata collection by this module are
+ * reported by adding their reference to a MetadataRefs collection. When no
+ * metadata values are added by this module, this method can simply return
+ * "null". Metadata values are single values within a workspace that specify
+ * information such as the root filename or series number. These references tell
+ * downstream modules what metadata is available. Returned references should be
+ * the original copies stored in the local "metadataRefs" object.
*/
@Override
public MetadataRefs updateAndGetMetadataReferences() {
@@ -136,7 +189,12 @@ public MetadataRefs updateAndGetMetadataReferences() {
}
/**
- * Any parent-child relationships established between objects by this module are reported by adding their reference to a ParentChildRefs collection. When no parent-child relationships are added by this module, this method can simply return "null". These references tell downstream modules what parent-child relationships are available. Returned references should be the original copies stored in the local "parentChildRefs" object.
+ * Any parent-child relationships established between objects by this module are
+ * reported by adding their reference to a ParentChildRefs collection. When no
+ * parent-child relationships are added by this module, this method can simply
+ * return "null". These references tell downstream modules what parent-child
+ * relationships are available. Returned references should be the original
+ * copies stored in the local "parentChildRefs" object.
*/
@Override
public ParentChildRefs updateAndGetParentChildRefs() {
@@ -145,15 +203,22 @@ public ParentChildRefs updateAndGetParentChildRefs() {
}
/**
- * Any partner-partner relationships established between objects by this module are reported by adding their reference to a PartnerRefs collection. When no partner-partner relationships are added by this module, this method can simply return "null". These references tell downstream modules what partner-partner relationships are available. Returned references should be the original copies stored in the local "partnerRefs" object.
- */
+ * Any partner-partner relationships established between objects by this module
+ * are reported by adding their reference to a PartnerRefs collection. When no
+ * partner-partner relationships are added by this module, this method can
+ * simply return "null". These references tell downstream modules what
+ * partner-partner relationships are available. Returned references should be
+ * the original copies stored in the local "partnerRefs" object.
+ */
@Override
public PartnerRefs updateAndGetPartnerRefs() {
return null;
}
/**
- * Can be used to perform checks on parameters or other conditions to ensure the module is configured correctly. This runs whenever a workflow is updated (e.g. a parameter in any module is changed).
+ * Can be used to perform checks on parameters or other conditions to ensure the
+ * module is configured correctly. This runs whenever a workflow is updated
+ * (e.g. a parameter in any module is changed).
*/
@Override
public boolean verify() {
diff --git a/Ex1_NucleiSegmentation/Ex1_NucleiSegmentation.mia b/Ex1_NucleiSegmentation/Ex1_NucleiSegmentation.mia
index 0cfc732..f32ffcf 100644
--- a/Ex1_NucleiSegmentation/Ex1_NucleiSegmentation.mia
+++ b/Ex1_NucleiSegmentation/Ex1_NucleiSegmentation.mia
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/Ex1_NucleiSegmentation/ExampleResults/Ex1_3DStack1_S1_overlay.tif b/Ex1_NucleiSegmentation/ExampleResults/Ex1_3DStack1_S1_overlay.tif
index f100d32..085ffbe 100644
Binary files a/Ex1_NucleiSegmentation/ExampleResults/Ex1_3DStack1_S1_overlay.tif and b/Ex1_NucleiSegmentation/ExampleResults/Ex1_3DStack1_S1_overlay.tif differ
diff --git a/Ex1_NucleiSegmentation/ExampleResults/Ex1_3DStack2_S1_overlay.tif b/Ex1_NucleiSegmentation/ExampleResults/Ex1_3DStack2_S1_overlay.tif
index 6dd09f7..1351ebb 100644
Binary files a/Ex1_NucleiSegmentation/ExampleResults/Ex1_3DStack2_S1_overlay.tif and b/Ex1_NucleiSegmentation/ExampleResults/Ex1_3DStack2_S1_overlay.tif differ
diff --git a/Ex1_NucleiSegmentation/ExampleResults/Ex1_NucleiSegmentation.xlsx b/Ex1_NucleiSegmentation/ExampleResults/Ex1_NucleiSegmentation.xlsx
index acf58ea..63a4b20 100644
Binary files a/Ex1_NucleiSegmentation/ExampleResults/Ex1_NucleiSegmentation.xlsx and b/Ex1_NucleiSegmentation/ExampleResults/Ex1_NucleiSegmentation.xlsx differ
diff --git a/Ex2_ObjectTracking/Ex2_ObjectTracking.mia b/Ex2_ObjectTracking/Ex2_ObjectTracking.mia
index 6b2d3bc..dbaaa2c 100644
--- a/Ex2_ObjectTracking/Ex2_ObjectTracking.mia
+++ b/Ex2_ObjectTracking/Ex2_ObjectTracking.mia
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/Ex2_ObjectTracking/ExampleResults/Ex2_Cell-Image-Library-11813.xlsx b/Ex2_ObjectTracking/ExampleResults/Ex2_Cell-Image-Library-11813.xlsx
index c52f976..708ecd8 100644
Binary files a/Ex2_ObjectTracking/ExampleResults/Ex2_Cell-Image-Library-11813.xlsx and b/Ex2_ObjectTracking/ExampleResults/Ex2_Cell-Image-Library-11813.xlsx differ
diff --git a/Ex2_ObjectTracking/ExampleResults/Ex2_Cell-Image-Library-11813_S1_overlay.tif b/Ex2_ObjectTracking/ExampleResults/Ex2_Cell-Image-Library-11813_S1_overlay.tif
index 1c4cc3f..c1b8ab8 100644
Binary files a/Ex2_ObjectTracking/ExampleResults/Ex2_Cell-Image-Library-11813_S1_overlay.tif and b/Ex2_ObjectTracking/ExampleResults/Ex2_Cell-Image-Library-11813_S1_overlay.tif differ
diff --git a/Ex2_ObjectTracking/ExampleResults/Ex2_Cell-Image-Library-11813_S1_tracks.avi b/Ex2_ObjectTracking/ExampleResults/Ex2_Cell-Image-Library-11813_S1_tracks.avi
new file mode 100644
index 0000000..4965b09
Binary files /dev/null and b/Ex2_ObjectTracking/ExampleResults/Ex2_Cell-Image-Library-11813_S1_tracks.avi differ
diff --git a/Ex3_Skeletonisation/Ex3_Skeletonisation.mia b/Ex3_Skeletonisation/Ex3_Skeletonisation.mia
index a5acae3..73faa87 100644
--- a/Ex3_Skeletonisation/Ex3_Skeletonisation.mia
+++ b/Ex3_Skeletonisation/Ex3_Skeletonisation.mia
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/Ex3_Skeletonisation/ExampleResults/Ex3_Skeletonisation.xlsx b/Ex3_Skeletonisation/ExampleResults/Ex3_Skeletonisation.xlsx
index 72df17b..d0489bf 100644
Binary files a/Ex3_Skeletonisation/ExampleResults/Ex3_Skeletonisation.xlsx and b/Ex3_Skeletonisation/ExampleResults/Ex3_Skeletonisation.xlsx differ
diff --git a/Ex3_Skeletonisation/ExampleResults/Ex3_Skeletonisation_overlay.tif b/Ex3_Skeletonisation/ExampleResults/Ex3_Skeletonisation_overlay.tif
index 6ba811a..7823849 100644
Binary files a/Ex3_Skeletonisation/ExampleResults/Ex3_Skeletonisation_overlay.tif and b/Ex3_Skeletonisation/ExampleResults/Ex3_Skeletonisation_overlay.tif differ