From 4ecbdfd73a1126a3c5aa108be1839c483e9a271e Mon Sep 17 00:00:00 2001 From: Stephen Cross Date: Tue, 21 May 2024 16:12:41 +0100 Subject: [PATCH 1/5] Minor additions --- .../mia/module/images/transform/ProjectImage.java | 7 ++++++- .../mia/module/inputoutput/LoadObjectsFromROIs.java | 5 +++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/mia-modules/src/main/java/io/github/mianalysis/mia/module/images/transform/ProjectImage.java b/mia-modules/src/main/java/io/github/mianalysis/mia/module/images/transform/ProjectImage.java index 8d0810b8f..16d4236bc 100644 --- a/mia-modules/src/main/java/io/github/mianalysis/mia/module/images/transform/ProjectImage.java +++ b/mia-modules/src/main/java/io/github/mianalysis/mia/module/images/transform/ProjectImage.java @@ -10,6 +10,7 @@ import io.github.mianalysis.mia.module.Category; import io.github.mianalysis.mia.module.Module; import io.github.mianalysis.mia.module.Modules; +import io.github.mianalysis.mia.module.images.configure.SetLookupTable; import io.github.mianalysis.mia.object.Workspace; import io.github.mianalysis.mia.object.image.Image; import io.github.mianalysis.mia.object.image.ImageFactory; @@ -240,7 +241,11 @@ public static & NativeType> Image project(Image inputI CalibratedAxis axOut = new DefaultLinearAxis(axIn.type(), axIn.unit(), axIn.calibratedValue(1)); proj.setAxis(axOut, proj.numDimensions() - 1); - return ImageFactory.createImage(outputImageName, proj); + Image projectedImage = ImageFactory.createImage(outputImageName, proj); + + SetLookupTable.copyLUTFromImage(projectedImage,inputImage); + + return projectedImage; } diff --git a/mia-modules/src/main/java/io/github/mianalysis/mia/module/inputoutput/LoadObjectsFromROIs.java b/mia-modules/src/main/java/io/github/mianalysis/mia/module/inputoutput/LoadObjectsFromROIs.java index 97988af82..38dc255cf 100644 --- a/mia-modules/src/main/java/io/github/mianalysis/mia/module/inputoutput/LoadObjectsFromROIs.java +++ b/mia-modules/src/main/java/io/github/mianalysis/mia/module/inputoutput/LoadObjectsFromROIs.java @@ -46,8 +46,6 @@ import io.github.mianalysis.mia.object.refs.collections.ObjMetadataRefs; import io.github.mianalysis.mia.object.refs.collections.ParentChildRefs; import io.github.mianalysis.mia.object.refs.collections.PartnerRefs; -import io.github.mianalysis.mia.object.system.Colours; -import io.github.mianalysis.mia.object.system.Preferences; import io.github.mianalysis.mia.object.system.Status; import io.github.mianalysis.mia.object.units.TemporalUnit; import io.github.mianalysis.mia.process.system.FileTools; @@ -221,6 +219,9 @@ static void addRoi(Objs outputObjects, Objs trackObjects, Roi roi, String name) int t = Integer.parseInt(matcher.group(3)) - 1; int z = Integer.parseInt(matcher.group(4)) - 1; + if (t >= outputObjects.getNFrames() || z >= outputObjects.getNSlices()) + return; + if (!outputObjects.keySet().contains(oid)) outputObjects.createAndAddNewObject(VolumeType.QUADTREE, oid); Obj outputObject = outputObjects.get(oid); From f7c9af947ff11f8711ac96a9694ef6353ba4282c Mon Sep 17 00:00:00 2001 From: Stephen Cross Date: Thu, 23 May 2024 09:55:21 +0100 Subject: [PATCH 2/5] Added object metadata filter --- .../filter/AbstractNumericObjectFilter.java | 2 +- .../objects/filter/AbstractObjectFilter.java | 27 ++- .../filter/AbstractTextObjectFilter.java | 101 ++++++++ .../mia/module/workflow/WorkflowHandling.java | 25 +- .../mia/object/image/ImagePlusImage.java | 3 +- .../objects/filter/FilterByChildren.java | 15 +- .../objects/filter/FilterByMeasurement.java | 30 ++- .../filter/FilterByMeasurementExtremes.java | 4 +- .../objects/filter/FilterByMetadata.java | 223 ++++++++++++++++++ .../objects/filter/FilterByPartners.java | 6 +- .../objects/filter/FilterByProximity.java | 132 +++++++---- .../module/objects/filter/FilterObjects.java | 5 +- .../objects/filter/FilterOnImageEdge.java | 129 ++++++---- .../filter/FilterSpecificObjectIDs.java | 98 ++++---- .../filter/FilterWithWithoutMeasurement.java | 89 ++++--- .../filter/FilterWithWithoutParent.java | 141 ++++++----- .../ApplyWekaObjectClassification.java | 1 - .../parameterlist/ParametersPanel.java | 8 +- 18 files changed, 752 insertions(+), 287 deletions(-) create mode 100644 mia-core/src/main/java/io/github/mianalysis/mia/module/objects/filter/AbstractTextObjectFilter.java create mode 100644 mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterByMetadata.java diff --git a/mia-core/src/main/java/io/github/mianalysis/mia/module/objects/filter/AbstractNumericObjectFilter.java b/mia-core/src/main/java/io/github/mianalysis/mia/module/objects/filter/AbstractNumericObjectFilter.java index d956884d9..b9bc6fcef 100644 --- a/mia-core/src/main/java/io/github/mianalysis/mia/module/objects/filter/AbstractNumericObjectFilter.java +++ b/mia-core/src/main/java/io/github/mianalysis/mia/module/objects/filter/AbstractNumericObjectFilter.java @@ -362,7 +362,7 @@ protected void addParameterDescriptions() { parameters.get(STORE_SUMMARY_RESULTS).setDescription( "When selected, a metadata value is stored in the workspace, which records the number of objects which failed the filter and were removed or moved to another object class (depending on the \"" - + FILTER_MODE + "\" parameter)."); + + FILTER_METHOD + "\" parameter)."); } } \ No newline at end of file diff --git a/mia-core/src/main/java/io/github/mianalysis/mia/module/objects/filter/AbstractObjectFilter.java b/mia-core/src/main/java/io/github/mianalysis/mia/module/objects/filter/AbstractObjectFilter.java index f181a450d..1fa3db84f 100644 --- a/mia-core/src/main/java/io/github/mianalysis/mia/module/objects/filter/AbstractObjectFilter.java +++ b/mia-core/src/main/java/io/github/mianalysis/mia/module/objects/filter/AbstractObjectFilter.java @@ -19,6 +19,7 @@ import io.github.mianalysis.mia.object.parameters.abstrakt.Parameter; import io.github.mianalysis.mia.object.parameters.objects.OutputObjectsP; import io.github.mianalysis.mia.object.refs.ObjMeasurementRef; +import io.github.mianalysis.mia.object.refs.ObjMetadataRef; import io.github.mianalysis.mia.object.refs.collections.ObjMeasurementRefs; import io.github.mianalysis.mia.object.refs.collections.ObjMetadataRefs; import io.github.mianalysis.mia.object.refs.collections.ParentChildRefs; @@ -157,6 +158,30 @@ public ObjMeasurementRefs updateAndGetObjectMeasurementRefs() { } + @Override + public ObjMetadataRefs updateAndGetObjectMetadataRefs() { + Workspace workspace = null; + ObjMetadataRefs returnedRefs = new ObjMetadataRefs(); + + // If the filtered objects are to be moved to a new class, assign them the + // metadata values they've lost + if (parameters.getValue(FILTER_MODE, workspace).equals(FilterModes.MOVE_FILTERED)) { + String inputObjectsName = parameters.getValue(INPUT_OBJECTS, workspace); + String filteredObjectsName = parameters.getValue(OUTPUT_FILTERED_OBJECTS, workspace); + + // Getting object metadata references associated with this object set + ObjMetadataRefs references = modules.getObjectMetadataRefs(inputObjectsName, this); + + for (ObjMetadataRef reference : references.values()) { + returnedRefs + .add(objectMetadataRefs.getOrPut(reference.getName()).setObjectsName(filteredObjectsName)); + } + } + + return returnedRefs; + + } + @Override public ParentChildRefs updateAndGetParentChildRefs() { Workspace workspace = null; @@ -191,7 +216,7 @@ public ParentChildRefs updateAndGetParentChildRefs() { @Override public PartnerRefs updateAndGetPartnerRefs() { -Workspace workspace = null; + Workspace workspace = null; PartnerRefs returnedRefs = new PartnerRefs(); switch ((String) parameters.getValue(FILTER_MODE, workspace)) { diff --git a/mia-core/src/main/java/io/github/mianalysis/mia/module/objects/filter/AbstractTextObjectFilter.java b/mia-core/src/main/java/io/github/mianalysis/mia/module/objects/filter/AbstractTextObjectFilter.java new file mode 100644 index 000000000..ad955350a --- /dev/null +++ b/mia-core/src/main/java/io/github/mianalysis/mia/module/objects/filter/AbstractTextObjectFilter.java @@ -0,0 +1,101 @@ +package io.github.mianalysis.mia.module.objects.filter; + +import io.github.mianalysis.mia.module.Modules; +import io.github.mianalysis.mia.object.parameters.BooleanP; +import io.github.mianalysis.mia.object.parameters.ChoiceP; +import io.github.mianalysis.mia.object.parameters.Parameters; +import io.github.mianalysis.mia.object.parameters.SeparatorP; +import io.github.mianalysis.mia.object.parameters.text.StringP; +import io.github.mianalysis.mia.object.parameters.text.StringP; + +public abstract class AbstractTextObjectFilter extends AbstractObjectFilter { + public static final String FILTER_SEPARATOR = "Object filtering"; + public static final String FILTER_METHOD = "Method for filtering"; + public static final String REFERENCE_VALUE = "Reference value"; + + public static final String MEASUREMENT_SEPARATOR = "Measurement output"; + public static final String STORE_SUMMARY_RESULTS = "Store summary filter results"; + public static final String STORE_INDIVIDUAL_RESULTS = "Store individual filter results"; + + public interface FilterMethods { + String CONTAINS = "Contains"; + String DOES_NOT_CONTAIN = "Does not contain"; + String EQUAL_TO = "Equal to"; + String NOT_EQUAL_TO = "Not equal to"; + + String[] ALL = new String[] { CONTAINS, DOES_NOT_CONTAIN, EQUAL_TO, NOT_EQUAL_TO }; + + } + + protected AbstractTextObjectFilter(String name, Modules modules) { + super(name, modules); + } + + public String getIndividualFullName(String filterMethod, String targetName, String referenceValue) { + return "FILTER // " + targetName + " " + filterMethod.toLowerCase() + " " + referenceValue; + } + + public String getSummaryFullName(String inputObjectsName, String filterMethod, String targetName, + String referenceValue) { + return "FILTER // NUM_" + inputObjectsName + " WHERE " + targetName + " " + filterMethod.toLowerCase() + " " + + referenceValue; + } + + public static boolean testFilter(String testValue, String referenceValue, String filterMethod) { + switch (filterMethod) { + case FilterMethods.CONTAINS: + return testValue.contains(referenceValue); + case FilterMethods.DOES_NOT_CONTAIN: + return !testValue.contains(referenceValue); + case FilterMethods.EQUAL_TO: + return testValue.equals(referenceValue); + case FilterMethods.NOT_EQUAL_TO: + return !testValue.equals(referenceValue); + } + + return false; + + } + + @Override + protected void initialiseParameters() { + super.initialiseParameters(); + + parameters.add(new SeparatorP(FILTER_SEPARATOR, this)); + parameters.add(new ChoiceP(FILTER_METHOD, this, FilterMethods.EQUAL_TO, FilterMethods.ALL)); + parameters.add(new StringP(REFERENCE_VALUE, this)); + + parameters.add(new SeparatorP(MEASUREMENT_SEPARATOR, this)); + parameters.add(new BooleanP(STORE_SUMMARY_RESULTS, this, false)); + parameters.add(new BooleanP(STORE_INDIVIDUAL_RESULTS, this, false)); + + } + + @Override + public Parameters updateAndGetParameters() { + Parameters returnedParameters = new Parameters(); + returnedParameters.addAll(super.updateAndGetParameters()); + + returnedParameters.add(parameters.getParameter(FILTER_SEPARATOR)); + returnedParameters.add(parameters.getParameter(FILTER_METHOD)); + returnedParameters.add(parameters.getParameter(REFERENCE_VALUE)); + + return returnedParameters; + + } + + public Parameters updateAndGetMeasurementParameters() { + Parameters returnedParameters = new Parameters(); + + returnedParameters.add(parameters.getParameter(MEASUREMENT_SEPARATOR)); + returnedParameters.add(parameters.getParameter(STORE_SUMMARY_RESULTS)); + returnedParameters.add(parameters.getParameter(STORE_INDIVIDUAL_RESULTS)); + + return returnedParameters; + + } + + @Override + protected void addParameterDescriptions() { + } +} \ No newline at end of file diff --git a/mia-core/src/main/java/io/github/mianalysis/mia/module/workflow/WorkflowHandling.java b/mia-core/src/main/java/io/github/mianalysis/mia/module/workflow/WorkflowHandling.java index 61b03c436..93f682841 100644 --- a/mia-core/src/main/java/io/github/mianalysis/mia/module/workflow/WorkflowHandling.java +++ b/mia-core/src/main/java/io/github/mianalysis/mia/module/workflow/WorkflowHandling.java @@ -12,6 +12,7 @@ import io.github.mianalysis.mia.module.Module; import io.github.mianalysis.mia.module.Modules; import io.github.mianalysis.mia.module.objects.filter.AbstractNumericObjectFilter; +import io.github.mianalysis.mia.module.objects.filter.AbstractTextObjectFilter; import io.github.mianalysis.mia.object.Measurement; import io.github.mianalysis.mia.object.Objs; import io.github.mianalysis.mia.object.Workspace; @@ -253,14 +254,8 @@ public interface MessageLevels { public interface NumericFilterModes extends AbstractNumericObjectFilter.FilterMethods { } - public interface TextFilterModes { - String CONTAINS = "Contains"; - String DOES_NOT_CONTAIN = "Does not contain"; - String EQUAL_TO = "Equal to"; - String NOT_EQUAL_TO = "Not equal to"; - - String[] ALL = new String[] { CONTAINS, DOES_NOT_CONTAIN, EQUAL_TO, NOT_EQUAL_TO }; - + public interface TextFilterModes extends AbstractTextObjectFilter.FilterMethods { + } public interface ContinuationModes { @@ -372,19 +367,7 @@ public static boolean testNumericMetadata(String metadataValue, String reference } public static boolean testTextMetadata(String metadataValue, String referenceMode, String referenceValue) { - switch (referenceMode) { - case TextFilterModes.CONTAINS: - return metadataValue.contains(referenceValue); - case TextFilterModes.DOES_NOT_CONTAIN: - return !metadataValue.contains(referenceValue); - case TextFilterModes.EQUAL_TO: - return metadataValue.equals(referenceValue); - case TextFilterModes.NOT_EQUAL_TO: - return !metadataValue.equals(referenceValue); - } - - return false; - + return AbstractTextObjectFilter.testFilter(metadataValue, referenceValue, referenceMode); } public static boolean testObjectCount(Objs inputObjects, String referenceMode, double referenceValue) { diff --git a/mia-core/src/main/java/io/github/mianalysis/mia/object/image/ImagePlusImage.java b/mia-core/src/main/java/io/github/mianalysis/mia/object/image/ImagePlusImage.java index f57a737f5..b3017716c 100644 --- a/mia-core/src/main/java/io/github/mianalysis/mia/object/image/ImagePlusImage.java +++ b/mia-core/src/main/java/io/github/mianalysis/mia/object/image/ImagePlusImage.java @@ -194,7 +194,8 @@ public void addObjectCentroid(Obj obj, float hue) { public void show(String title, @Nullable LUT lut, boolean normalise, boolean composite) { // Show using this overlay - show(title, lut, normalise, composite, imagePlus.getOverlay()); + Overlay overlay = imagePlus.getOverlay() == null ? null : imagePlus.getOverlay().duplicate(); + show(title, lut, normalise, composite, overlay); } public void show(String title, @Nullable LUT lut, boolean normalise, boolean composite, Overlay overlay) { diff --git a/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterByChildren.java b/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterByChildren.java index 03e00a30c..c7bf3ccd5 100644 --- a/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterByChildren.java +++ b/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterByChildren.java @@ -2,12 +2,13 @@ import java.util.Iterator; +import org.scijava.Priority; +import org.scijava.plugin.Plugin; + import io.github.mianalysis.mia.module.Categories; import io.github.mianalysis.mia.module.Category; -import io.github.mianalysis.mia.module.Modules; import io.github.mianalysis.mia.module.Module; -import org.scijava.Priority; -import org.scijava.plugin.Plugin; +import io.github.mianalysis.mia.module.Modules; import io.github.mianalysis.mia.object.Measurement; import io.github.mianalysis.mia.object.Obj; import io.github.mianalysis.mia.object.Objs; @@ -89,7 +90,7 @@ protected Status process(Workspace workspace) { double value = 0; if (childObjects != null) value = childObjects.size(); - + double refValue = getReferenceValue(workspace, inputObject); boolean conditionMet = testFilter(value, refValue, filterMethod); @@ -167,7 +168,7 @@ public ObjMeasurementRefs updateAndGetObjectMeasurementRefs() { String inputObjectsName = parameters.getValue(INPUT_OBJECTS, workspace); returnedRefs.add(new ObjMeasurementRef(measurementName, inputObjectsName)); - if (parameters.getValue(FILTER_MODE, workspace).equals(FilterModes.MOVE_FILTERED)) { + if (parameters.getValue(FILTER_METHOD, workspace).equals(FilterModes.MOVE_FILTERED)) { String outputObjectsName = parameters.getValue(OUTPUT_FILTERED_OBJECTS, workspace); returnedRefs.add(new ObjMeasurementRef(measurementName, outputObjectsName)); } @@ -178,8 +179,8 @@ public ObjMeasurementRefs updateAndGetObjectMeasurementRefs() { } @Override - public ObjMetadataRefs updateAndGetObjectMetadataRefs() { - return null; + public ObjMetadataRefs updateAndGetObjectMetadataRefs() { + return super.updateAndGetObjectMetadataRefs(); } @Override diff --git a/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterByMeasurement.java b/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterByMeasurement.java index 595097b51..f8da31f11 100644 --- a/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterByMeasurement.java +++ b/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterByMeasurement.java @@ -22,16 +22,26 @@ import io.github.mianalysis.mia.object.refs.collections.ObjMetadataRefs; import io.github.mianalysis.mia.object.system.Status; - /** -* Filter an object collection based on a measurement value associated with this object. The threshold (reference) value can be either a fixed value (same for all objects), a measurement associated with an image (same for all objects within a single analysis run) or a measurement associated with a parent object (potentially different for all objects). Objects which satisfy the specified numeric filter (less than, equal to, greater than, etc.) can be removed from the input collection, moved to another collection (and removed from the input collection) or simply counted (but retained in the input collection). The number of objects failing the filter can be stored as a metadata value. -*/ + * Filter an object collection based on a measurement value associated with this + * object. The threshold (reference) value can be either a fixed value (same for + * all objects), a measurement associated with an image (same for all objects + * within a single analysis run) or a measurement associated with a parent + * object (potentially different for all objects). Objects which satisfy the + * specified numeric filter (less than, equal to, greater than, etc.) can be + * removed from the input collection, moved to another collection (and removed + * from the input collection) or simply counted (but retained in the input + * collection). The number of objects failing the filter can be stored as a + * metadata value. + */ @Plugin(type = Module.class, priority = Priority.LOW, visible = true) public class FilterByMeasurement extends AbstractNumericObjectFilter { - /** - * Objects will be filtered against their value of this measurement. Objects missing this measurement are not removed; however, they can be removed by using the module "With / without measurement". - */ + /** + * Objects will be filtered against their value of this measurement. Objects + * missing this measurement are not removed; however, they can be removed by + * using the module "With / without measurement". + */ public static final String MEASUREMENT = "Measurement to filter on"; public FilterByMeasurement(Modules modules) { @@ -80,7 +90,7 @@ protected Status process(Workspace workspace) { // Skipping this object if it doesn't have the measurement Measurement measurement = inputObject.getMeasurement(measName); if (measurement == null) - continue; + continue; double value = measurement.getValue(); double refValue = getReferenceValue(workspace, inputObject); @@ -165,7 +175,7 @@ public ObjMeasurementRefs updateAndGetObjectMeasurementRefs() { String inputObjectsName = parameters.getValue(INPUT_OBJECTS, workspace); returnedRefs.add(new ObjMeasurementRef(measurementName, inputObjectsName)); - if (parameters.getValue(FILTER_MODE, workspace).equals(FilterModes.MOVE_FILTERED)) { + if (parameters.getValue(FILTER_METHOD, workspace).equals(FilterModes.MOVE_FILTERED)) { String outputObjectsName = parameters.getValue(OUTPUT_FILTERED_OBJECTS, workspace); returnedRefs.add(new ObjMeasurementRef(measurementName, outputObjectsName)); } @@ -176,8 +186,8 @@ public ObjMeasurementRefs updateAndGetObjectMeasurementRefs() { } @Override - public ObjMetadataRefs updateAndGetObjectMetadataRefs() { - return null; + public ObjMetadataRefs updateAndGetObjectMetadataRefs() { + return super.updateAndGetObjectMetadataRefs(); } @Override diff --git a/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterByMeasurementExtremes.java b/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterByMeasurementExtremes.java index 28d79da43..12f167eb3 100644 --- a/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterByMeasurementExtremes.java +++ b/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterByMeasurementExtremes.java @@ -323,8 +323,8 @@ public ObjMeasurementRefs updateAndGetObjectMeasurementRefs() { } @Override - public ObjMetadataRefs updateAndGetObjectMetadataRefs() { - return null; + public ObjMetadataRefs updateAndGetObjectMetadataRefs() { + return super.updateAndGetObjectMetadataRefs(); } @Override diff --git a/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterByMetadata.java b/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterByMetadata.java new file mode 100644 index 000000000..86fc27167 --- /dev/null +++ b/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterByMetadata.java @@ -0,0 +1,223 @@ +package io.github.mianalysis.mia.module.objects.filter; + +import java.util.Iterator; + +import org.scijava.Priority; +import org.scijava.plugin.Plugin; + +import io.github.mianalysis.mia.MIA; +import io.github.mianalysis.mia.module.Categories; +import io.github.mianalysis.mia.module.Category; +import io.github.mianalysis.mia.module.Module; +import io.github.mianalysis.mia.module.Modules; +import io.github.mianalysis.mia.object.Measurement; +import io.github.mianalysis.mia.object.Obj; +import io.github.mianalysis.mia.object.ObjMetadata; +import io.github.mianalysis.mia.object.Objs; +import io.github.mianalysis.mia.object.Workspace; +import io.github.mianalysis.mia.object.parameters.ObjectMetadataP; +import io.github.mianalysis.mia.object.parameters.Parameters; +import io.github.mianalysis.mia.object.refs.ObjMeasurementRef; +import io.github.mianalysis.mia.object.refs.collections.ImageMeasurementRefs; +import io.github.mianalysis.mia.object.refs.collections.MetadataRefs; +import io.github.mianalysis.mia.object.refs.collections.ObjMeasurementRefs; +import io.github.mianalysis.mia.object.refs.collections.ObjMetadataRefs; +import io.github.mianalysis.mia.object.system.Status; + +/** + * Filter an object collection based on a measurement value associated with this + * object. The threshold (reference) value can be either a fixed value (same for + * all objects), a measurement associated with an image (same for all objects + * within a single analysis run) or a measurement associated with a parent + * object (potentially different for all objects). Objects which satisfy the + * specified numeric filter (less than, equal to, greater than, etc.) can be + * removed from the input collection, moved to another collection (and removed + * from the input collection) or simply counted (but retained in the input + * collection). The number of objects failing the filter can be stored as a + * metadata value. + */ +@Plugin(type = Module.class, priority = Priority.LOW, visible = true) +public class FilterByMetadata extends AbstractTextObjectFilter { + + public static final String METADATA_VALUE = "Metadata to filter on"; + + public FilterByMetadata(Modules modules) { + super("Based on metadata", modules); + } + + @Override + public Category getCategory() { + return Categories.OBJECTS_FILTER; + } + + @Override + public String getVersionNumber() { + return "1.0.0"; + } + + @Override + public String getDescription() { + return "Filter an object collection based on a metadata value associated with this object."; + } + + @Override + protected Status process(Workspace workspace) { + // Getting input objects + String inputObjectsName = parameters.getValue(INPUT_OBJECTS, workspace); + Objs inputObjects = workspace.getObjects().get(inputObjectsName); + + // Getting parameters + String filterMode = parameters.getValue(FILTER_MODE, workspace); + String outputObjectsName = parameters.getValue(OUTPUT_FILTERED_OBJECTS, workspace); + String filterMethod = parameters.getValue(FILTER_METHOD, workspace); + String metadataName = parameters.getValue(METADATA_VALUE, workspace); + String refValue = parameters.getValue(REFERENCE_VALUE, workspace); + boolean storeSummary = parameters.getValue(STORE_SUMMARY_RESULTS, workspace); + boolean storeIndividual = parameters.getValue(STORE_INDIVIDUAL_RESULTS, workspace); + + boolean moveObjects = filterMode.equals(FilterModes.MOVE_FILTERED); + boolean remove = !filterMode.equals(FilterModes.DO_NOTHING); + + Objs outputObjects = moveObjects ? new Objs(outputObjectsName, inputObjects) : null; + + int count = 0; + Iterator iterator = inputObjects.values().iterator(); + while (iterator.hasNext()) { + Obj inputObject = iterator.next(); + + // Skipping this object if it doesn't have the measurement + ObjMetadata metadata = inputObject.getMetadataItem(metadataName); + if (metadata == null) + continue; + + String value = metadata.getValue(); + + // Checking the main filter + boolean conditionMet = testFilter(value, refValue, filterMethod); + + // Adding measurements + if (storeIndividual) { + String measurementName = getIndividualFullName(filterMethod, metadataName, refValue); + inputObject.addMeasurement(new Measurement(measurementName, conditionMet ? 1 : 0)); + } + + if (conditionMet) { + count++; + if (remove) + processRemoval(inputObject, outputObjects, iterator); + } + } + + // If moving objects, add them to the workspace + if (moveObjects) + workspace.addObjects(outputObjects); + + // If storing the result, create a new metadata item for it + if (storeSummary) { + String measurementName = getSummaryFullName(inputObjectsName, filterMethod, metadataName, refValue); + workspace.getMetadata().put(measurementName, count); + } + + // Showing objects + if (showOutput) { + inputObjects.convertToImageIDColours().show(); + if (moveObjects && outputObjects != null) + outputObjects.convertToImageIDColours().show(); + + } + + return Status.PASS; + + } + + @Override + protected void initialiseParameters() { + super.initialiseParameters(); + + parameters.add(new ObjectMetadataP(METADATA_VALUE, this)); + + addParameterDescriptions(); + + } + + @Override + public Parameters updateAndGetParameters() { + Workspace workspace = null; + Parameters returnedParameters = new Parameters(); + returnedParameters.addAll(super.updateAndGetParameters()); + + String inputObjectsName = parameters.getValue(INPUT_OBJECTS, workspace); + returnedParameters.add(parameters.getParameter(METADATA_VALUE)); + ((ObjectMetadataP) parameters.getParameter(METADATA_VALUE)).setObjectName(inputObjectsName); + + returnedParameters.addAll(updateAndGetMeasurementParameters()); + + return returnedParameters; + + } + + @Override + public ImageMeasurementRefs updateAndGetImageMeasurementRefs() { + return null; + } + + @Override + public ObjMeasurementRefs updateAndGetObjectMeasurementRefs() { + Workspace workspace = null; + ObjMeasurementRefs returnedRefs = super.updateAndGetObjectMeasurementRefs(); + + if ((boolean) parameters.getValue(STORE_INDIVIDUAL_RESULTS, workspace)) { + String metadataName = parameters.getValue(METADATA_VALUE, workspace); + String filterMethod = parameters.getValue(FILTER_METHOD, workspace); + String refValue = parameters.getValue(REFERENCE_VALUE, workspace); + String measurementName = getIndividualFullName(filterMethod, metadataName, refValue); + String inputObjectsName = parameters.getValue(INPUT_OBJECTS, workspace); + + returnedRefs.add(new ObjMeasurementRef(measurementName, inputObjectsName)); + if (parameters.getValue(FILTER_METHOD, workspace).equals(FilterModes.MOVE_FILTERED)) { + String outputObjectsName = parameters.getValue(OUTPUT_FILTERED_OBJECTS, workspace); + returnedRefs.add(new ObjMeasurementRef(measurementName, outputObjectsName)); + } + } + + return returnedRefs; + + } + + @Override + public ObjMetadataRefs updateAndGetObjectMetadataRefs() { + return super.updateAndGetObjectMetadataRefs(); + } + + @Override + public MetadataRefs updateAndGetMetadataReferences() { + Workspace workspace = null; + MetadataRefs returnedRefs = new MetadataRefs(); + + // Filter results are stored as a metadata item since they apply to the whole + // set + if ((boolean) parameters.getValue(STORE_SUMMARY_RESULTS, workspace)) { + String inputObjectsName = parameters.getValue(INPUT_OBJECTS, workspace); + String metadataName = parameters.getValue(METADATA_VALUE, workspace); + String filterMethod = parameters.getValue(FILTER_METHOD, workspace); + String refValue = parameters.getValue(REFERENCE_VALUE, workspace); + String measurementName = getSummaryFullName(inputObjectsName, filterMethod, metadataName, refValue); + + returnedRefs.add(metadataRefs.getOrPut(measurementName)); + + } + + return returnedRefs; + + } + + @Override + protected void addParameterDescriptions() { + super.addParameterDescriptions(); + + parameters.get(METADATA_VALUE).setDescription( + "Objects will be filtered against their value of this measurement. Objects missing this measurement are not removed; however, they can be removed by using the module \"" + + new FilterWithWithoutMeasurement(null).getName() + "\"."); + + } +} diff --git a/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterByPartners.java b/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterByPartners.java index d3b365c7c..81e302433 100644 --- a/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterByPartners.java +++ b/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterByPartners.java @@ -169,7 +169,7 @@ public ObjMeasurementRefs updateAndGetObjectMeasurementRefs() { String inputObjectsName = parameters.getValue(INPUT_OBJECTS, workspace); returnedRefs.add(new ObjMeasurementRef(measurementName, inputObjectsName)); - if (parameters.getValue(FILTER_MODE, workspace).equals(FilterModes.MOVE_FILTERED)) { + if (parameters.getValue(FILTER_METHOD, workspace).equals(FilterModes.MOVE_FILTERED)) { String outputObjectsName = parameters.getValue(OUTPUT_FILTERED_OBJECTS, workspace); returnedRefs.add(new ObjMeasurementRef(measurementName, outputObjectsName)); } @@ -180,8 +180,8 @@ public ObjMeasurementRefs updateAndGetObjectMeasurementRefs() { } @Override - public ObjMetadataRefs updateAndGetObjectMetadataRefs() { - return null; + public ObjMetadataRefs updateAndGetObjectMetadataRefs() { + return super.updateAndGetObjectMetadataRefs(); } @Override diff --git a/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterByProximity.java b/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterByProximity.java index 7ad664b2f..34e709177 100644 --- a/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterByProximity.java +++ b/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterByProximity.java @@ -5,14 +5,14 @@ import java.util.Iterator; import java.util.LinkedHashMap; +import org.scijava.Priority; +import org.scijava.plugin.Plugin; + import io.github.mianalysis.mia.module.Categories; import io.github.mianalysis.mia.module.Category; +import io.github.mianalysis.mia.module.Module; import io.github.mianalysis.mia.module.Modules; import io.github.mianalysis.mia.module.objects.measure.spatial.CalculateNearestNeighbour; -import io.github.mianalysis.mia.module.Module; -import org.scijava.Priority; -import org.scijava.plugin.Plugin; - import io.github.mianalysis.mia.object.Measurement; import io.github.mianalysis.mia.object.Obj; import io.github.mianalysis.mia.object.Objs; @@ -29,46 +29,87 @@ import io.github.mianalysis.mia.object.refs.collections.ObjMetadataRefs; import io.github.mianalysis.mia.object.system.Status; - /** -* Filters objects in close XY proximity based on a specific measurement. For two, or more, objects within close proximity of each other the object with the largest (or smallest) measurement will be retained, whilst the others will be removed. This can be used to filter instances of the same object being detected multiple times. Distances are only considered in XY. Any Z-axis information on object position will be ignored. -*/ + * Filters objects in close XY proximity based on a specific measurement. For + * two, or more, objects within close proximity of each other the object with + * the largest (or smallest) measurement will be retained, whilst the others + * will be removed. This can be used to filter instances of the same object + * being detected multiple times. Distances are only considered in XY. Any + * Z-axis information on object position will be ignored. + */ @Plugin(type = Module.class, priority = Priority.LOW, visible = true) public class FilterByProximity extends AbstractObjectFilter { - /** - * - */ + /** + * + */ public static final String FILTER_SEPARATOR = "Object filtering"; - /** - * Controls the method used for determining the nearest neighbour distances:
  • "Centroid (2D)" Distances are between the input and neighbour object centroids, but only in the XY plane. These distances are always positive; increasing as the distance between centroids increases.
  • "Centroid (3D)" Distances are between the input and neighbour object centroids. These distances are always positive; increasing as the distance between centroids increases.
  • "Surface (2D)" Distances are between the closest points on the input and neighbour surfaces, but only in the XY plane. These distances increase in magnitude the greater the minimum input-neighbour object surface distance is; however, they are assigned a positive value if the closest input object surface point is outside the neighbour and a negative value if the closest input object surface point is inside the neighbour. For example, a closest input object surface point 5px outside the neighbour will be simply "5px", whereas a closest input object surface point 5px from the surface, but contained within the neighbour object will be recorded as "-5px". Note: Any instances where the input and neighbour object surfaces overlap will be recorded as "0px" distance.
  • "Surface (3D)" Distances are between the closest points on the input and neighbour surfaces. These distances increase in magnitude the greater the minimum input-neighbour object surface distance is; however, they are assigned a positive value if the closest input object surface point is outside the neighbour and a negative value if the closest input object surface point is inside the neighbour. For example, a closest input object surface point 5px outside the neighbour will be simply "5px", whereas a closest input object surface point 5px from the surface, but contained within the neighbour object will be recorded as "-5px". Note: Any instances where the input and neighbour object surfaces overlap will be recorded as "0px" distance.
- */ + /** + * Controls the method used for determining the nearest neighbour distances:
+ *
    + *
  • "Centroid (2D)" Distances are between the input and neighbour object + * centroids, but only in the XY plane. These distances are always positive; + * increasing as the distance between centroids increases.
  • + *
  • "Centroid (3D)" Distances are between the input and neighbour object + * centroids. These distances are always positive; increasing as the distance + * between centroids increases.
  • + *
  • "Surface (2D)" Distances are between the closest points on the input and + * neighbour surfaces, but only in the XY plane. These distances increase in + * magnitude the greater the minimum input-neighbour object surface distance is; + * however, they are assigned a positive value if the closest input object + * surface point is outside the neighbour and a negative value if the closest + * input object surface point is inside the neighbour. For example, a closest + * input object surface point 5px outside the neighbour will be simply "5px", + * whereas a closest input object surface point 5px from the surface, but + * contained within the neighbour object will be recorded as "-5px". Note: Any + * instances where the input and neighbour object surfaces overlap will be + * recorded as "0px" distance.
  • + *
  • "Surface (3D)" Distances are between the closest points on the input and + * neighbour surfaces. These distances increase in magnitude the greater the + * minimum input-neighbour object surface distance is; however, they are + * assigned a positive value if the closest input object surface point is + * outside the neighbour and a negative value if the closest input object + * surface point is inside the neighbour. For example, a closest input object + * surface point 5px outside the neighbour will be simply "5px", whereas a + * closest input object surface point 5px from the surface, but contained within + * the neighbour object will be recorded as "-5px". Note: Any instances where + * the input and neighbour object surfaces overlap will be recorded as "0px" + * distance.
  • + *
+ */ public static final String REFERENCE_MODE = "Reference mode"; - /** - * Minimum allowed distance in XY plane for two objects to co-exist. Any objects with XY separation smaller than this value will be subject to filtering, where the "less suitable" (depending on filter settings) object will be removed. - */ + /** + * Minimum allowed distance in XY plane for two objects to co-exist. Any objects + * with XY separation smaller than this value will be subject to filtering, + * where the "less suitable" (depending on filter settings) object will be + * removed. + */ public static final String MINIMUM_SEPARATION = "Minimum separation"; - /** - * When selected, object-object distances are to be specified in calibrated units; otherwise, units are specified in pixels. - */ + /** + * When selected, object-object distances are to be specified in calibrated + * units; otherwise, units are specified in pixels. + */ public static final String CALIBRATED_UNITS = "Calibrated units"; - /** - * When selected, objects must be in the same time frame for them to be linked. - */ + /** + * When selected, objects must be in the same time frame for them to be linked. + */ public static final String LINK_IN_SAME_FRAME = "Only link objects in same frame"; - /** - * For objects closer than the value specified by "Minimum separation" this parameter controls which will be retained. - */ + /** + * For objects closer than the value specified by "Minimum separation" this + * parameter controls which will be retained. + */ public static final String FILTER_METHOD = "Method for filtering"; - /** - * Objects will be filtered against their value of this measurement. Objects missing this measurement are not removed; however, they can be removed by using the module "With / without measurement". - */ + /** + * Objects will be filtered against their value of this measurement. Objects + * missing this measurement are not removed; however, they can be removed by + * using the module "With / without measurement". + */ public static final String MEASUREMENT = "Measurement to filter on"; public FilterByProximity(Modules modules) { @@ -128,24 +169,24 @@ public String getVersionNumber() { @Override public String getDescription() { return "Filters objects in close XY proximity based on a specific measurement. For two, or more, objects within close proximity of each other the object with the largest (or smallest) measurement will be retained, whilst the others will be removed. This can be used to filter instances of the same object being detected multiple times. Distances are only considered in XY. Any Z-axis information on object position will be ignored."; - + } @Override protected Status process(Workspace workspace) { // Getting input objects - String inputObjectsName = parameters.getValue(INPUT_OBJECTS,workspace); + String inputObjectsName = parameters.getValue(INPUT_OBJECTS, workspace); Objs inputObjects = workspace.getObjects().get(inputObjectsName); // Getting parameters - String filterMode = parameters.getValue(FILTER_MODE,workspace); - String outputObjectsName = parameters.getValue(OUTPUT_FILTERED_OBJECTS,workspace); - String referenceMode = parameters.getValue(REFERENCE_MODE,workspace); - double minSeparation = parameters.getValue(MINIMUM_SEPARATION,workspace); - boolean calibratedUnits = parameters.getValue(CALIBRATED_UNITS,workspace); - boolean linkInSameFrame = parameters.getValue(LINK_IN_SAME_FRAME,workspace); - String filterMethod = parameters.getValue(FILTER_METHOD,workspace); - String measName = parameters.getValue(MEASUREMENT,workspace); + String filterMode = parameters.getValue(FILTER_MODE, workspace); + String outputObjectsName = parameters.getValue(OUTPUT_FILTERED_OBJECTS, workspace); + String referenceMode = parameters.getValue(REFERENCE_MODE, workspace); + double minSeparation = parameters.getValue(MINIMUM_SEPARATION, workspace); + boolean calibratedUnits = parameters.getValue(CALIBRATED_UNITS, workspace); + boolean linkInSameFrame = parameters.getValue(LINK_IN_SAME_FRAME, workspace); + String filterMethod = parameters.getValue(FILTER_METHOD, workspace); + String measName = parameters.getValue(MEASUREMENT, workspace); boolean moveObjects = filterMode.equals(FilterModes.MOVE_FILTERED); boolean remove = !filterMode.equals(FilterModes.DO_NOTHING); @@ -227,8 +268,8 @@ protected void initialiseParameters() { @Override public Parameters updateAndGetParameters() { -Workspace workspace = null; - String inputObjectsName = parameters.getValue(INPUT_OBJECTS,workspace); + Workspace workspace = null; + String inputObjectsName = parameters.getValue(INPUT_OBJECTS, workspace); Parameters returnedParameters = new Parameters(); returnedParameters.addAll(super.updateAndGetParameters()); @@ -249,24 +290,23 @@ public Parameters updateAndGetParameters() { @Override public ImageMeasurementRefs updateAndGetImageMeasurementRefs() { -return null; + return null; } @Override -public ObjMeasurementRefs updateAndGetObjectMeasurementRefs() { -Workspace workspace = null; + public ObjMeasurementRefs updateAndGetObjectMeasurementRefs() { return super.updateAndGetObjectMeasurementRefs(); } @Override - public ObjMetadataRefs updateAndGetObjectMetadataRefs() { - return null; + public ObjMetadataRefs updateAndGetObjectMetadataRefs() { + return super.updateAndGetObjectMetadataRefs(); } @Override public MetadataRefs updateAndGetMetadataReferences() { -return null; + return null; } @Override diff --git a/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterObjects.java b/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterObjects.java index 77ac670a7..7ef999081 100644 --- a/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterObjects.java +++ b/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterObjects.java @@ -17,12 +17,12 @@ import javax.swing.JLabel; import javax.swing.JTextField; -import com.drew.lang.annotations.Nullable; import org.scijava.Priority; import org.scijava.plugin.Plugin; +import com.drew.lang.annotations.Nullable; + import ij.ImagePlus; -import io.github.mianalysis.mia.MIA; import io.github.mianalysis.mia.module.Categories; import io.github.mianalysis.mia.module.Category; import io.github.mianalysis.mia.module.Module; @@ -33,7 +33,6 @@ import io.github.mianalysis.mia.object.Objs; import io.github.mianalysis.mia.object.Workspace; import io.github.mianalysis.mia.object.image.Image; -import io.github.mianalysis.mia.object.image.ImageFactory; import io.github.mianalysis.mia.object.parameters.BooleanP; import io.github.mianalysis.mia.object.parameters.ChildObjectsP; import io.github.mianalysis.mia.object.parameters.ChoiceP; diff --git a/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterOnImageEdge.java b/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterOnImageEdge.java index fba2e9efc..59ae25745 100644 --- a/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterOnImageEdge.java +++ b/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterOnImageEdge.java @@ -24,51 +24,84 @@ import io.github.mianalysis.mia.object.refs.collections.ObjMetadataRefs; import io.github.mianalysis.mia.object.system.Status; - /** -* Filter an object collection based on contact of each object with the image edge. Contact is considered as a case where an object pixel is in the outer-most row, column or slice of an image (e.g. x = 0 or y = max_value). The maximum number of contact pixels before an object is removed can be set to permit a degree of contact. Objects identified as being in contact with the image edge can be removed from the input collection, moved to another collection (and removed from the input collection) or simply counted (but retained in the input collection). The number of objects failing the filter can be stored as a metadata value.

Image edge filters can be used when counting the number of objects in a field of view - in this case, typically two adjacent edges are removed (e.g. bottom and right) to prevent over-counting. Alternatively, removing objects on all edges can be performed when measuring whole-object properties such as area or volume to prevent under-measuring values. -*/ -@Plugin(type = Module.class, priority=Priority.LOW, visible=true) + * Filter an object collection based on contact of each object with the image + * edge. Contact is considered as a case where an object pixel is in the + * outer-most row, column or slice of an image (e.g. x = 0 or y = max_value). + * The maximum number of contact pixels before an object is removed can be set + * to permit a degree of contact. Objects identified as being in contact with + * the image edge can be removed from the input collection, moved to another + * collection (and removed from the input collection) or simply counted (but + * retained in the input collection). The number of objects failing the filter + * can be stored as a metadata value.
+ *
+ * Image edge filters can be used when counting the number of objects in a field + * of view - in this case, typically two adjacent edges are removed (e.g. bottom + * and right) to prevent over-counting. Alternatively, removing objects on all + * edges can be performed when measuring whole-object properties such as area or + * volume to prevent under-measuring values. + */ +@Plugin(type = Module.class, priority = Priority.LOW, visible = true) public class FilterOnImageEdge extends AbstractObjectFilter { - /** - * - */ + /** + * + */ public static final String FILTER_SEPARATOR = "Object filtering"; - /** - * Maximum number of object pixels which can lie along any of the specified edges without the object being removed. This provides tolerance for objects which only just make contact with the image edge. - */ + /** + * Maximum number of object pixels which can lie along any of the specified + * edges without the object being removed. This provides tolerance for objects + * which only just make contact with the image edge. + */ public static final String MAXIMUM_CONTACT = "Maximum permitted contact"; - /** - * When selected, object pixels which make contact with the top of the image (y = 0) will count towards the "Maximum permitted contact" limit. If not selected, pixels along this edge will be ignored (i.e. contact won't lead to object removal). - */ + /** + * When selected, object pixels which make contact with the top of the image (y + * = 0) will count towards the "Maximum permitted contact" limit. If not + * selected, pixels along this edge will be ignored (i.e. contact won't lead to + * object removal). + */ public static final String REMOVE_ON_TOP = "Remove on top"; - /** - * When selected, object pixels which make contact with the left side of the image (x = 0) will count towards the "Maximum permitted contact" limit. If not selected, pixels along this edge will be ignored (i.e. contact won't lead to object removal). - */ + /** + * When selected, object pixels which make contact with the left side of the + * image (x = 0) will count towards the "Maximum permitted contact" limit. If + * not selected, pixels along this edge will be ignored (i.e. contact won't lead + * to object removal). + */ public static final String REMOVE_ON_LEFT = "Remove on left"; - /** - * When selected, object pixels which make contact with the bottom of the image (y = max_value) will count towards the "Maximum permitted contact" limit. If not selected, pixels along this edge will be ignored (i.e. contact won't lead to object removal). - */ + /** + * When selected, object pixels which make contact with the bottom of the image + * (y = max_value) will count towards the "Maximum permitted contact" limit. If + * not selected, pixels along this edge will be ignored (i.e. contact won't lead + * to object removal). + */ public static final String REMOVE_ON_BOTTOM = "Remove on bottom"; - /** - * When selected, object pixels which make contact with the right side of the image (x = max_value) will count towards the "Maximum permitted contact" limit. If not selected, pixels along this edge will be ignored (i.e. contact won't lead to object removal). - */ + /** + * When selected, object pixels which make contact with the right side of the + * image (x = max_value) will count towards the "Maximum permitted contact" + * limit. If not selected, pixels along this edge will be ignored (i.e. contact + * won't lead to object removal). + */ public static final String REMOVE_ON_RIGHT = "Remove on right"; - /** - * When selected, object pixels which make contact with the lower (z = 0) and upper (z = max_value) slices of the image stack will count towards the "Maximum permitted contact" limit. If not selected, pixels along this edge will be ignored (i.e. contact won't lead to object removal). If enabled for single slice stacks all objects will removed. - */ + /** + * When selected, object pixels which make contact with the lower (z = 0) and + * upper (z = max_value) slices of the image stack will count towards the + * "Maximum permitted contact" limit. If not selected, pixels along this edge + * will be ignored (i.e. contact won't lead to object removal). If enabled for + * single slice stacks all objects will removed. + */ public static final String INCLUDE_Z_POSITION = "Include Z-position"; - /** - * When selected, the number of removed (or moved) objects is counted and stored as a metadata item (name in the format "FILTER // NUM_[inputObjectsName] TOUCHING_IM_EDGE (3D)"). - */ + /** + * When selected, the number of removed (or moved) objects is counted and stored + * as a metadata item (name in the format "FILTER // NUM_[inputObjectsName] + * TOUCHING_IM_EDGE (3D)"). + */ public static final String STORE_RESULTS = "Store filter results"; public FilterOnImageEdge(Modules modules) { @@ -149,7 +182,6 @@ public static boolean hasContactWithEdge(Obj obj, int maxContact, boolean[] remo } - @Override public Category getCategory() { return Categories.OBJECTS_FILTER; @@ -169,18 +201,18 @@ public String getDescription() { @Override protected Status process(Workspace workspace) { // Getting input objects - String inputObjectsName = parameters.getValue(INPUT_OBJECTS,workspace); + String inputObjectsName = parameters.getValue(INPUT_OBJECTS, workspace); Objs inputObjects = workspace.getObjects().get(inputObjectsName); // Getting parameters - String filterMode = parameters.getValue(FILTER_MODE,workspace); - String outputObjectsName = parameters.getValue(OUTPUT_FILTERED_OBJECTS,workspace); - int maxContact = parameters.getValue(MAXIMUM_CONTACT,workspace); - boolean removeTop = parameters.getValue(REMOVE_ON_TOP,workspace); - boolean removeLeft = parameters.getValue(REMOVE_ON_LEFT,workspace); - boolean removeBottom = parameters.getValue(REMOVE_ON_BOTTOM,workspace); - boolean removeRight = parameters.getValue(REMOVE_ON_RIGHT,workspace); - boolean includeZ = parameters.getValue(INCLUDE_Z_POSITION,workspace); + String filterMode = parameters.getValue(FILTER_MODE, workspace); + String outputObjectsName = parameters.getValue(OUTPUT_FILTERED_OBJECTS, workspace); + int maxContact = parameters.getValue(MAXIMUM_CONTACT, workspace); + boolean removeTop = parameters.getValue(REMOVE_ON_TOP, workspace); + boolean removeLeft = parameters.getValue(REMOVE_ON_LEFT, workspace); + boolean removeBottom = parameters.getValue(REMOVE_ON_BOTTOM, workspace); + boolean removeRight = parameters.getValue(REMOVE_ON_RIGHT, workspace); + boolean includeZ = parameters.getValue(INCLUDE_Z_POSITION, workspace); boolean moveObjects = filterMode.equals(FilterModes.MOVE_FILTERED); boolean remove = !filterMode.equals(FilterModes.DO_NOTHING); @@ -226,7 +258,6 @@ protected void initialiseParameters() { @Override public Parameters updateAndGetParameters() { -Workspace workspace = null; Parameters returnedParameters = new Parameters(); returnedParameters.addAll(super.updateAndGetParameters()); @@ -245,31 +276,31 @@ public Parameters updateAndGetParameters() { @Override public ImageMeasurementRefs updateAndGetImageMeasurementRefs() { -return null; + return null; } @Override -public ObjMeasurementRefs updateAndGetObjectMeasurementRefs() { -Workspace workspace = null; + public ObjMeasurementRefs updateAndGetObjectMeasurementRefs() { + Workspace workspace = null; return super.updateAndGetObjectMeasurementRefs(); } @Override - public ObjMetadataRefs updateAndGetObjectMetadataRefs() { - return null; + public ObjMetadataRefs updateAndGetObjectMetadataRefs() { + return super.updateAndGetObjectMetadataRefs(); } @Override public MetadataRefs updateAndGetMetadataReferences() { -Workspace workspace = null; + Workspace workspace = null; MetadataRefs returnedRefs = new MetadataRefs(); // Filter results are stored as a metadata item since they apply to the whole // set - if ((boolean) parameters.getValue(STORE_RESULTS,workspace)) { - String inputObjectsName = parameters.getValue(INPUT_OBJECTS,workspace); - boolean includeZ = parameters.getValue(INCLUDE_Z_POSITION,workspace); + if ((boolean) parameters.getValue(STORE_RESULTS, workspace)) { + String inputObjectsName = parameters.getValue(INPUT_OBJECTS, workspace); + boolean includeZ = parameters.getValue(INCLUDE_Z_POSITION, workspace); String metadataName = getMetadataName(inputObjectsName, includeZ); @@ -284,7 +315,7 @@ public MetadataRefs updateAndGetMetadataReferences() { @Override protected void addParameterDescriptions() { super.addParameterDescriptions(); - + parameters.get(MAXIMUM_CONTACT).setDescription( "Maximum number of object pixels which can lie along any of the specified edges without the object being removed. This provides tolerance for objects which only just make contact with the image edge."); diff --git a/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterSpecificObjectIDs.java b/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterSpecificObjectIDs.java index 990ab0f3d..4153b72ca 100644 --- a/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterSpecificObjectIDs.java +++ b/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterSpecificObjectIDs.java @@ -14,12 +14,12 @@ import javax.swing.JLabel; import javax.swing.JTextField; -import com.drew.lang.annotations.Nullable; import org.scijava.Priority; import org.scijava.plugin.Plugin; +import com.drew.lang.annotations.Nullable; + import ij.ImagePlus; -import io.github.mianalysis.mia.MIA; import io.github.mianalysis.mia.module.Categories; import io.github.mianalysis.mia.module.Category; import io.github.mianalysis.mia.module.Module; @@ -29,7 +29,6 @@ import io.github.mianalysis.mia.object.Objs; import io.github.mianalysis.mia.object.Workspace; import io.github.mianalysis.mia.object.image.Image; -import io.github.mianalysis.mia.object.image.ImageFactory; import io.github.mianalysis.mia.object.parameters.BooleanP; import io.github.mianalysis.mia.object.parameters.InputImageP; import io.github.mianalysis.mia.object.parameters.Parameters; @@ -41,31 +40,46 @@ import io.github.mianalysis.mia.object.system.Status; import io.github.mianalysis.mia.process.string.CommaSeparatedStringInterpreter; - /** -* Filter an object collection based on user-defined list of object ID numbers. When the module executes, the user is presented with a dialog box where they can enter a comma-separated list of object IDs to remove. Once the list is complete, the user presses "OK" to proceed. All objects with ID numbers matching those in the list can be removed from the input collection, moved to another collection (and removed from the input collection) or simply counted (but retained in the input collection). To assist with selection of ID numbers, an optional image can be displayed - this could be pre-prepared to display object ID numbers using the "Add labels" module. The number of objects specified for removal can be stored as a metadata value. -*/ -@Plugin(type = Module.class, priority=Priority.LOW, visible=true) + * Filter an object collection based on user-defined list of object ID numbers. + * When the module executes, the user is presented with a dialog box where they + * can enter a comma-separated list of object IDs to remove. Once the list is + * complete, the user presses "OK" to proceed. All objects with ID numbers + * matching those in the list can be removed from the input collection, moved to + * another collection (and removed from the input collection) or simply counted + * (but retained in the input collection). To assist with selection of ID + * numbers, an optional image can be displayed - this could be pre-prepared to + * display object ID numbers using the "Add labels" module. The number of + * objects specified for removal can be stored as a metadata value. + */ +@Plugin(type = Module.class, priority = Priority.LOW, visible = true) public class FilterSpecificObjectIDs extends AbstractObjectFilter implements ActionListener { - /** - * - */ + /** + * + */ public static final String FILTER_SEPARATOR = "Object filtering"; - /** - * When selected, a specific image will be displayed when this module executes. This can be used to display a pre-prepared, object ID-labelled image to the user, thus acting as a reference for which object IDs to remove. The image to be displayed is set using the "Image to display" parameter. - */ + /** + * When selected, a specific image will be displayed when this module executes. + * This can be used to display a pre-prepared, object ID-labelled image to the + * user, thus acting as a reference for which object IDs to remove. The image to + * be displayed is set using the "Image to display" parameter. + */ public static final String SHOW_IMAGE = "Show image"; - /** - * Image to display when the module executes. For example, this could be a pre-prepared image with object IDs inserted as text overlays using the "Add labels" module. - */ + /** + * Image to display when the module executes. For example, this could be a + * pre-prepared image with object IDs inserted as text overlays using the "Add + * labels" module. + */ public static final String DISPLAY_IMAGE_NAME = "Image to display"; - /** - * When selected, the number of removed (or moved) objects is counted and stored as a metadata item (name in the format "FILTER // NUM_[inputObjectsName]_BY_ID"). - */ + /** + * When selected, the number of removed (or moved) objects is counted and stored + * as a metadata item (name in the format "FILTER // + * NUM_[inputObjectsName]_BY_ID"). + */ public static final String STORE_RESULTS = "Store filter results"; private static final String OK = "OK"; @@ -154,7 +168,7 @@ public int filter(Objs inputObjects, @Nullable Objs outputObjects, boolean remov count++; if (remove) { obj.removeRelationships(); - if (outputObjects != null) { + if (outputObjects != null) { outputObjects.add(obj); obj.setObjectCollection(outputObjects); } @@ -166,7 +180,6 @@ public int filter(Objs inputObjects, @Nullable Objs outputObjects, boolean remov } - @Override public Category getCategory() { return Categories.OBJECTS_FILTER; @@ -182,20 +195,20 @@ public String getDescription() { return "Filter an object collection based on user-defined list of object ID numbers. When the module executes, the user is presented with a dialog box where they can enter a comma-separated list of object IDs to remove. Once the list is complete, the user presses \"OK\" to proceed. All objects with ID numbers matching those in the list can be removed from the input collection, moved to another collection (and removed from the input collection) or simply counted (but retained in the input collection). To assist with selection of ID numbers, an optional image can be displayed - this could be pre-prepared to display object ID numbers using the \"" + new AddLabels(null).getName() + "\" module. The number of objects specified for removal can be stored as a metadata value."; - + } @Override protected Status process(Workspace workspace) { // Getting input objects - String inputObjectsName = parameters.getValue(INPUT_OBJECTS,workspace); + String inputObjectsName = parameters.getValue(INPUT_OBJECTS, workspace); Objs inputObjects = workspace.getObjects().get(inputObjectsName); // Getting parameters - String filterMode = parameters.getValue(FILTER_MODE,workspace); - String outputObjectsName = parameters.getValue(OUTPUT_FILTERED_OBJECTS,workspace); - boolean showImage = parameters.getValue(SHOW_IMAGE,workspace); - String displayImageName = parameters.getValue(DISPLAY_IMAGE_NAME,workspace); + String filterMode = parameters.getValue(FILTER_MODE, workspace); + String outputObjectsName = parameters.getValue(OUTPUT_FILTERED_OBJECTS, workspace); + boolean showImage = parameters.getValue(SHOW_IMAGE, workspace); + String displayImageName = parameters.getValue(DISPLAY_IMAGE_NAME, workspace); boolean moveObjects = filterMode.equals(FilterModes.MOVE_FILTERED); boolean remove = !filterMode.equals(FilterModes.DO_NOTHING); @@ -231,17 +244,17 @@ protected void initialiseParameters() { parameters.add(new BooleanP(STORE_RESULTS, this, false)); addParameterDescriptions(); - + } @Override public Parameters updateAndGetParameters() { -Workspace workspace = null; + Workspace workspace = null; Parameters returnedParameters = new Parameters(); returnedParameters.addAll(super.updateAndGetParameters()); returnedParameters.add(parameters.getParameter(FILTER_SEPARATOR)); returnedParameters.add(parameters.getParameter(SHOW_IMAGE)); - if ((boolean) parameters.getValue(SHOW_IMAGE,workspace)) { + if ((boolean) parameters.getValue(SHOW_IMAGE, workspace)) { returnedParameters.add(parameters.getParameter(DISPLAY_IMAGE_NAME)); } @@ -253,29 +266,28 @@ public Parameters updateAndGetParameters() { @Override public ImageMeasurementRefs updateAndGetImageMeasurementRefs() { -return null; + return null; } @Override -public ObjMeasurementRefs updateAndGetObjectMeasurementRefs() { -Workspace workspace = null; + public ObjMeasurementRefs updateAndGetObjectMeasurementRefs() { return super.updateAndGetObjectMeasurementRefs(); } @Override - public ObjMetadataRefs updateAndGetObjectMetadataRefs() { - return null; + public ObjMetadataRefs updateAndGetObjectMetadataRefs() { + return super.updateAndGetObjectMetadataRefs(); } @Override public MetadataRefs updateAndGetMetadataReferences() { -Workspace workspace = null; + Workspace workspace = null; MetadataRefs returnedRefs = new MetadataRefs(); // Filter results are stored as a metadata item since they apply to the whole // set - if ((boolean) parameters.getValue(STORE_RESULTS,workspace)) { - String inputObjectsName = parameters.getValue(INPUT_OBJECTS,workspace); + if ((boolean) parameters.getValue(STORE_RESULTS, workspace)) { + String inputObjectsName = parameters.getValue(INPUT_OBJECTS, workspace); String metadataName = getMetadataName(inputObjectsName); @@ -289,10 +301,14 @@ public MetadataRefs updateAndGetMetadataReferences() { @Override protected void addParameterDescriptions() { super.addParameterDescriptions(); - - parameters.get(SHOW_IMAGE).setDescription("When selected, a specific image will be displayed when this module executes. This can be used to display a pre-prepared, object ID-labelled image to the user, thus acting as a reference for which object IDs to remove. The image to be displayed is set using the \""+DISPLAY_IMAGE_NAME+"\" parameter."); - parameters.get(DISPLAY_IMAGE_NAME).setDescription("Image to display when the module executes. For example, this could be a pre-prepared image with object IDs inserted as text overlays using the \""+new AddLabels(null).getName()+"\" module."); + parameters.get(SHOW_IMAGE).setDescription( + "When selected, a specific image will be displayed when this module executes. This can be used to display a pre-prepared, object ID-labelled image to the user, thus acting as a reference for which object IDs to remove. The image to be displayed is set using the \"" + + DISPLAY_IMAGE_NAME + "\" parameter."); + + parameters.get(DISPLAY_IMAGE_NAME).setDescription( + "Image to display when the module executes. For example, this could be a pre-prepared image with object IDs inserted as text overlays using the \"" + + new AddLabels(null).getName() + "\" module."); String metadataName = getMetadataName("[inputObjectsName]"); parameters.get(STORE_RESULTS).setDescription( diff --git a/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterWithWithoutMeasurement.java b/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterWithWithoutMeasurement.java index ca5cdcc05..c7760a4fa 100644 --- a/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterWithWithoutMeasurement.java +++ b/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterWithWithoutMeasurement.java @@ -23,31 +23,48 @@ import io.github.mianalysis.mia.object.refs.collections.ObjMetadataRefs; import io.github.mianalysis.mia.object.system.Status; - /** -* Filter an object collection based on the presence of a specific measurement for each object. Objects which do/don't have the relevant measurement can be removed from the input collection, moved to another collection (and removed from the input collection) or simply counted (but retained in the input collection). The number of objects failing the filter can be stored as a metadata value. -*/ -@Plugin(type = Module.class, priority=Priority.LOW, visible=true) + * Filter an object collection based on the presence of a specific measurement + * for each object. Objects which do/don't have the relevant measurement can be + * removed from the input collection, moved to another collection (and removed + * from the input collection) or simply counted (but retained in the input + * collection). The number of objects failing the filter can be stored as a + * metadata value. + */ +@Plugin(type = Module.class, priority = Priority.LOW, visible = true) public class FilterWithWithoutMeasurement extends AbstractObjectFilter { - /** - * - */ + /** + * + */ public static final String FILTER_SEPARATOR = "Object filtering"; - /** - * Controls whether objects are removed when a specific measurement is present or not:

- "Remove objects without measurement" Objects without the measurement specified by "Measurement to filter on" are removed, counted or moved (depending on the "Filter mode" parameter).

- "Remove objects with measurement" Objects with the measurement specified by "Measurement to filter on" are removed, counted or moved (depending on the "Filter mode" parameter).
- */ + /** + * Controls whether objects are removed when a specific measurement is present + * or not:
+ *
+ * - "Remove objects without measurement" Objects without the measurement + * specified by "Measurement to filter on" are removed, counted or moved + * (depending on the "Filter mode" parameter).
+ *
+ * - "Remove objects with measurement" Objects with the measurement specified by + * "Measurement to filter on" are removed, counted or moved (depending on the + * "Filter mode" parameter).
+ */ public static final String FILTER_METHOD = "Method for filtering"; - /** - * Measurement to filter by. The presence or absence of this measurement will determine which of the input objects are counted, removed or moved (depending on the "Filter mode" parameter). - */ + /** + * Measurement to filter by. The presence or absence of this measurement will + * determine which of the input objects are counted, removed or moved (depending + * on the "Filter mode" parameter). + */ public static final String MEASUREMENT = "Measurement to filter on"; - /** - * When selected, the number of removed (or moved) objects is counted and stored as a metadata item (name in the format "FILTER // NUM_[inputObjectsName] WITHOUT [measurementName] MEASUREMENT"). - */ + /** + * When selected, the number of removed (or moved) objects is counted and stored + * as a metadata item (name in the format "FILTER // NUM_[inputObjectsName] + * WITHOUT [measurementName] MEASUREMENT"). + */ public static final String STORE_RESULTS = "Store filter results"; public FilterWithWithoutMeasurement(Modules modules) { @@ -73,7 +90,6 @@ public String getMetadataName(String inputObjectsName, String filterMethod, Stri } } - @Override public Category getCategory() { return Categories.OBJECTS_FILTER; @@ -92,15 +108,15 @@ public String getDescription() { @Override protected Status process(Workspace workspace) { // Getting input objects - String inputObjectsName = parameters.getValue(INPUT_OBJECTS,workspace); + String inputObjectsName = parameters.getValue(INPUT_OBJECTS, workspace); Objs inputObjects = workspace.getObjects().get(inputObjectsName); // Getting parameters - String filterMode = parameters.getValue(FILTER_MODE,workspace); - String outputObjectsName = parameters.getValue(OUTPUT_FILTERED_OBJECTS,workspace); - String filterMethod = parameters.getValue(FILTER_METHOD,workspace); - String measName = parameters.getValue(MEASUREMENT,workspace); - boolean storeResults = parameters.getValue(STORE_RESULTS,workspace); + String filterMode = parameters.getValue(FILTER_MODE, workspace); + String outputObjectsName = parameters.getValue(OUTPUT_FILTERED_OBJECTS, workspace); + String filterMethod = parameters.getValue(FILTER_METHOD, workspace); + String measName = parameters.getValue(MEASUREMENT, workspace); + boolean storeResults = parameters.getValue(STORE_RESULTS, workspace); boolean moveObjects = filterMode.equals(FilterModes.MOVE_FILTERED); boolean remove = !filterMode.equals(FilterModes.DO_NOTHING); @@ -154,8 +170,8 @@ protected void initialiseParameters() { @Override public Parameters updateAndGetParameters() { -Workspace workspace = null; - String inputObjectsName = parameters.getValue(INPUT_OBJECTS,workspace); + Workspace workspace = null; + String inputObjectsName = parameters.getValue(INPUT_OBJECTS, workspace); Parameters returnedParameters = new Parameters(); returnedParameters.addAll(super.updateAndGetParameters()); @@ -173,32 +189,31 @@ public Parameters updateAndGetParameters() { @Override public ImageMeasurementRefs updateAndGetImageMeasurementRefs() { -return null; + return null; } @Override -public ObjMeasurementRefs updateAndGetObjectMeasurementRefs() { -Workspace workspace = null; + public ObjMeasurementRefs updateAndGetObjectMeasurementRefs() { return super.updateAndGetObjectMeasurementRefs(); - + } @Override - public ObjMetadataRefs updateAndGetObjectMetadataRefs() { - return null; + public ObjMetadataRefs updateAndGetObjectMetadataRefs() { + return super.updateAndGetObjectMetadataRefs(); } @Override public MetadataRefs updateAndGetMetadataReferences() { -Workspace workspace = null; + Workspace workspace = null; MetadataRefs returnedRefs = new MetadataRefs(); // Filter results are stored as a metadata item since they apply to the whole // set - if ((boolean) parameters.getValue(STORE_RESULTS,workspace)) { - String inputObjectsName = parameters.getValue(INPUT_OBJECTS,workspace); - String filterMethod = parameters.getValue(FILTER_METHOD,workspace); - String measName = parameters.getValue(MEASUREMENT,workspace); + if ((boolean) parameters.getValue(STORE_RESULTS, workspace)) { + String inputObjectsName = parameters.getValue(INPUT_OBJECTS, workspace); + String filterMethod = parameters.getValue(FILTER_METHOD, workspace); + String measName = parameters.getValue(MEASUREMENT, workspace); String metadataName = getMetadataName(inputObjectsName, filterMethod, measName); @@ -213,7 +228,7 @@ public MetadataRefs updateAndGetMetadataReferences() { @Override protected void addParameterDescriptions() { super.addParameterDescriptions(); - + parameters.get(FILTER_METHOD).setDescription( "Controls whether objects are removed when a specific measurement is present or not:
" diff --git a/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterWithWithoutParent.java b/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterWithWithoutParent.java index 650715740..a1c1cf612 100644 --- a/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterWithWithoutParent.java +++ b/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/filter/FilterWithWithoutParent.java @@ -23,47 +23,61 @@ import io.github.mianalysis.mia.object.parameters.Parameters; import io.github.mianalysis.mia.object.parameters.ParentObjectsP; - /** -* Filter an object collection based on the presence of a specific parent for each object. Objects which do/don't have the relevant parent can be removed from the input collection, moved to another collection (and removed from the input collection) or simply counted (but retained in the input collection). The number of objects failing the filter can be stored as a metadata value. -*/ -@Plugin(type = Module.class, priority=Priority.LOW, visible=true) + * Filter an object collection based on the presence of a specific parent for + * each object. Objects which do/don't have the relevant parent can be removed + * from the input collection, moved to another collection (and removed from the + * input collection) or simply counted (but retained in the input collection). + * The number of objects failing the filter can be stored as a metadata value. + */ +@Plugin(type = Module.class, priority = Priority.LOW, visible = true) public class FilterWithWithoutParent extends AbstractObjectFilter { - /** - * - */ + /** + * + */ public static final String FILTER_SEPARATOR = "Object filtering"; - /** - * Controls whether objects are removed when a specific parent object is present or not:

- "Remove objects without parent" Objects without the parent specified by "Parent object" are removed, counted or moved (depending on the "Filter mode" parameter).

- "Remove objects with parent" Objects with the parent specified by "Parent object" are removed, counted or moved (depending on the "Filter mode" parameter).
- */ + /** + * Controls whether objects are removed when a specific parent object is present + * or not:
+ *
+ * - "Remove objects without parent" Objects without the parent specified by + * "Parent object" are removed, counted or moved (depending on the "Filter mode" + * parameter).
+ *
+ * - "Remove objects with parent" Objects with the parent specified by "Parent + * object" are removed, counted or moved (depending on the "Filter mode" + * parameter).
+ */ public static final String FILTER_METHOD = "Method for filtering"; - /** - * Parent object to filter by. The presence or absence of this relationship will determine which of the input objects are counted, removed or moved (depending on the "Filter mode" parameter). - */ + /** + * Parent object to filter by. The presence or absence of this relationship will + * determine which of the input objects are counted, removed or moved (depending + * on the "Filter mode" parameter). + */ public static final String PARENT_OBJECT = "Parent object"; - /** - * When selected, the number of removed (or moved) objects is counted and stored as a metadata item (name in the format "FILTER // NUM_[inputObjectsName] WITHOUT [parentObjectsName] PARENT"). - */ + /** + * When selected, the number of removed (or moved) objects is counted and stored + * as a metadata item (name in the format "FILTER // NUM_[inputObjectsName] + * WITHOUT [parentObjectsName] PARENT"). + */ public static final String STORE_RESULTS = "Store filter results"; public FilterWithWithoutParent(Modules modules) { - super("With / without parent",modules); + super("With / without parent", modules); } - public interface FilterMethods { String WITH_PARENT = "Remove objects with parent"; String WITHOUT_PARENT = "Remove objects without parent"; - String[] ALL = new String[]{WITH_PARENT,WITHOUT_PARENT}; + String[] ALL = new String[] { WITH_PARENT, WITHOUT_PARENT }; } - public static String getMetadataName(String inputObjectsName, String filterMethod, String parentObjectsName) { switch (filterMethod) { case FilterMethods.WITH_PARENT: @@ -75,8 +89,6 @@ public static String getMetadataName(String inputObjectsName, String filterMetho } } - - @Override public Category getCategory() { return Categories.OBJECTS_FILTER; @@ -95,45 +107,48 @@ public String getDescription() { @Override protected Status process(Workspace workspace) { // Getting input objects - String inputObjectsName = parameters.getValue(INPUT_OBJECTS,workspace); + String inputObjectsName = parameters.getValue(INPUT_OBJECTS, workspace); Objs inputObjects = workspace.getObjects().get(inputObjectsName); // Getting parameters - String filterMode = parameters.getValue(FILTER_MODE,workspace); - String outputObjectsName = parameters.getValue(OUTPUT_FILTERED_OBJECTS,workspace); - String filterMethod = parameters.getValue(FILTER_METHOD,workspace); - String parentObjectName = parameters.getValue(PARENT_OBJECT,workspace); - boolean storeResults = parameters.getValue(STORE_RESULTS,workspace); + String filterMode = parameters.getValue(FILTER_MODE, workspace); + String outputObjectsName = parameters.getValue(OUTPUT_FILTERED_OBJECTS, workspace); + String filterMethod = parameters.getValue(FILTER_METHOD, workspace); + String parentObjectName = parameters.getValue(PARENT_OBJECT, workspace); + boolean storeResults = parameters.getValue(STORE_RESULTS, workspace); boolean moveObjects = filterMode.equals(FilterModes.MOVE_FILTERED); boolean remove = !filterMode.equals(FilterModes.DO_NOTHING); - Objs outputObjects = moveObjects ? new Objs(outputObjectsName,inputObjects) : null; + Objs outputObjects = moveObjects ? new Objs(outputObjectsName, inputObjects) : null; int count = 0; Iterator iterator = inputObjects.values().iterator(); while (iterator.hasNext()) { Obj inputObject = iterator.next(); - LinkedHashMap parents = inputObject.getParents(true); + LinkedHashMap parents = inputObject.getParents(true); switch (filterMethod) { case FilterMethods.WITH_PARENT: if (parents.get(parentObjectName) != null) { count++; - if (remove) processRemoval(inputObject,outputObjects,iterator); + if (remove) + processRemoval(inputObject, outputObjects, iterator); } break; case FilterMethods.WITHOUT_PARENT: if (parents.get(parentObjectName) == null) { count++; - if (remove) processRemoval(inputObject,outputObjects,iterator); + if (remove) + processRemoval(inputObject, outputObjects, iterator); } break; } } // If moving objects, addRef them to the workspace - if (moveObjects) workspace.addObjects(outputObjects); + if (moveObjects) + workspace.addObjects(outputObjects); // If storing the result, create a new metadata item for it if (storeResults) { @@ -142,7 +157,8 @@ protected Status process(Workspace workspace) { } // Showing objects - if (showOutput) inputObjects.convertToImageIDColours().show(); + if (showOutput) + inputObjects.convertToImageIDColours().show(); return Status.PASS; @@ -151,8 +167,8 @@ protected Status process(Workspace workspace) { @Override protected void initialiseParameters() { super.initialiseParameters(); - - parameters.add(new SeparatorP(FILTER_SEPARATOR,this)); + + parameters.add(new SeparatorP(FILTER_SEPARATOR, this)); parameters.add(new ChoiceP(FILTER_METHOD, this, FilterMethods.WITH_PARENT, FilterMethods.ALL)); parameters.add(new ParentObjectsP(PARENT_OBJECT, this)); parameters.add(new BooleanP(STORE_RESULTS, this, false)); @@ -163,13 +179,13 @@ protected void initialiseParameters() { @Override public Parameters updateAndGetParameters() { -Workspace workspace = null; - String inputObjectsName = parameters.getValue(INPUT_OBJECTS,workspace); + Workspace workspace = null; + String inputObjectsName = parameters.getValue(INPUT_OBJECTS, workspace); Parameters returnedParameters = new Parameters(); returnedParameters.addAll(super.updateAndGetParameters()); - + returnedParameters.add(parameters.getParameter(FILTER_SEPARATOR)); returnedParameters.add(parameters.getParameter(FILTER_METHOD)); returnedParameters.add(parameters.getParameter(PARENT_OBJECT)); @@ -182,33 +198,33 @@ public Parameters updateAndGetParameters() { @Override public ImageMeasurementRefs updateAndGetImageMeasurementRefs() { -return null; + return null; } @Override -public ObjMeasurementRefs updateAndGetObjectMeasurementRefs() { -Workspace workspace = null; + public ObjMeasurementRefs updateAndGetObjectMeasurementRefs() { return super.updateAndGetObjectMeasurementRefs(); - + } @Override - public ObjMetadataRefs updateAndGetObjectMetadataRefs() { - return null; + public ObjMetadataRefs updateAndGetObjectMetadataRefs() { + return super.updateAndGetObjectMetadataRefs(); } @Override public MetadataRefs updateAndGetMetadataReferences() { -Workspace workspace = null; + Workspace workspace = null; MetadataRefs returnedRefs = new MetadataRefs(); - // Filter results are stored as a metadata item since they apply to the whole set - if ((boolean) parameters.getValue(STORE_RESULTS,workspace)) { - String inputObjectsName = parameters.getValue(INPUT_OBJECTS,workspace); - String filterMethod = parameters.getValue(FILTER_METHOD,workspace); - String parentObjectsName = parameters.getValue(PARENT_OBJECT,workspace); + // Filter results are stored as a metadata item since they apply to the whole + // set + if ((boolean) parameters.getValue(STORE_RESULTS, workspace)) { + String inputObjectsName = parameters.getValue(INPUT_OBJECTS, workspace); + String filterMethod = parameters.getValue(FILTER_METHOD, workspace); + String parentObjectsName = parameters.getValue(PARENT_OBJECT, workspace); - String metadataName = getMetadataName(inputObjectsName,filterMethod,parentObjectsName); + String metadataName = getMetadataName(inputObjectsName, filterMethod, parentObjectsName); returnedRefs.add(metadataRefs.getOrPut(metadataName)); @@ -221,24 +237,29 @@ public MetadataRefs updateAndGetMetadataReferences() { @Override protected void addParameterDescriptions() { super.addParameterDescriptions(); - + parameters.get(FILTER_METHOD).setDescription( "Controls whether objects are removed when a specific parent object is present or not:
" - + + "
- \"" + FilterMethods.WITHOUT_PARENT + "\" Objects without the parent specified by \"" + PARENT_OBJECT + "\" are removed, counted or moved (depending on the \"" + FILTER_MODE + "\" parameter).
" - + + "
- \"" + FilterMethods.WITH_PARENT + "\" Objects with the parent specified by \"" + PARENT_OBJECT + "\" are removed, counted or moved (depending on the \"" + FILTER_MODE + "\" parameter).
" - - ); - parameters.get(PARENT_OBJECT).setDescription("Parent object to filter by. The presence or absence of this relationship will determine which of the input objects are counted, removed or moved (depending on the \""+FILTER_MODE+"\" parameter)."); + ); + + parameters.get(PARENT_OBJECT).setDescription( + "Parent object to filter by. The presence or absence of this relationship will determine which of the input objects are counted, removed or moved (depending on the \"" + + FILTER_MODE + "\" parameter)."); - String metadataName = getMetadataName("[inputObjectsName]", FilterMethods.WITHOUT_PARENT, "[parentObjectsName]"); - parameters.get(STORE_RESULTS).setDescription("When selected, the number of removed (or moved) objects is counted and stored as a metadata item (name in the format \""+metadataName+"\")."); + String metadataName = getMetadataName("[inputObjectsName]", FilterMethods.WITHOUT_PARENT, + "[parentObjectsName]"); + parameters.get(STORE_RESULTS).setDescription( + "When selected, the number of removed (or moved) objects is counted and stored as a metadata item (name in the format \"" + + metadataName + "\")."); } } diff --git a/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/measure/miscellaneous/ApplyWekaObjectClassification.java b/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/measure/miscellaneous/ApplyWekaObjectClassification.java index 2dab281bf..c0f8644de 100644 --- a/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/measure/miscellaneous/ApplyWekaObjectClassification.java +++ b/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/measure/miscellaneous/ApplyWekaObjectClassification.java @@ -208,7 +208,6 @@ public Status process(Workspace workspace) { int classIndex = (int) abstractClassifier.classifyInstance(instances.get(i)); inputObject.addMeasurement(new Measurement(classMeasName, classIndex)); - inputObject.addMetadataItem(new ObjMetadata(ObjMetadataItems.CLASS, instances.classAttribute().value(classIndex))); } diff --git a/mia-plugin/src/main/java/io/github/mianalysis/mia/gui/regions/parameterlist/ParametersPanel.java b/mia-plugin/src/main/java/io/github/mianalysis/mia/gui/regions/parameterlist/ParametersPanel.java index 98b969615..4bec3ba70 100644 --- a/mia-plugin/src/main/java/io/github/mianalysis/mia/gui/regions/parameterlist/ParametersPanel.java +++ b/mia-plugin/src/main/java/io/github/mianalysis/mia/gui/regions/parameterlist/ParametersPanel.java @@ -113,22 +113,22 @@ public void updatePanel(Module module) { String exportMode = outputControl.getParameterValue(OutputControl.EXPORT_MODE,null); if (module.getClass().isInstance(new OutputControl(modules)) && outputControl.isEnabled() &! exportMode.equals(OutputControl.ExportModes.NONE)) { MetadataRefs metadataRefs = modules.getMetadataRefs(); - addRefExportControls(metadataRefs,"Metadata",componentFactory,c); + addRefExportControls(metadataRefs,"Workspace metadata",componentFactory,c); LinkedHashSet imageNameParameters = modules.getAvailableImages(null,false); for (OutputImageP imageNameParameter:imageNameParameters) { String imageName = imageNameParameter.getImageName(); ImageMeasurementRefs measurementReferences = modules.getImageMeasurementRefs(imageName); - addRefExportControls(measurementReferences,imageName+" (Image)",componentFactory,c); + addRefExportControls(measurementReferences,"\""+imageName+"\" image measurements",componentFactory,c); } LinkedHashSet objectNameParameters = modules.getAvailableObjects(null,false); for (OutputObjectsP objectNameParameter:objectNameParameters) { String objectName = objectNameParameter.getObjectsName(); ObjMetadataRefs objectMetadataReferences = modules.getObjectMetadataRefs(objectName); - addRefExportControls(objectMetadataReferences,objectName+" (Object)",componentFactory,c); + addRefExportControls(objectMetadataReferences,"\""+objectName+"\" object metadata",componentFactory,c); ObjMeasurementRefs measurementReferences = modules.getObjectMeasurementRefs(objectName); - addSummaryRefExportControls(measurementReferences,objectName+" (Object)",componentFactory,c); + addSummaryRefExportControls(measurementReferences,"\""+objectName+"\" object measurements",componentFactory,c); } } From a77b6f7a80be3e7159f6033593d5382877d39e05 Mon Sep 17 00:00:00 2001 From: Stephen Cross Date: Thu, 23 May 2024 14:54:14 +0100 Subject: [PATCH 3/5] Bugfixes for DeepImageJ integration --- .../images/process/ApplyDeepImageJModel.java | 132 ++++++++++++------ .../process/deepimagej/PrepareDeepImageJ.java | 3 +- 2 files changed, 91 insertions(+), 44 deletions(-) diff --git a/mia-deepimagej/src/main/java/io/github/mianalysis/mia/module/images/process/ApplyDeepImageJModel.java b/mia-deepimagej/src/main/java/io/github/mianalysis/mia/module/images/process/ApplyDeepImageJModel.java index 26e5a930f..c1e0d4429 100644 --- a/mia-deepimagej/src/main/java/io/github/mianalysis/mia/module/images/process/ApplyDeepImageJModel.java +++ b/mia-deepimagej/src/main/java/io/github/mianalysis/mia/module/images/process/ApplyDeepImageJModel.java @@ -7,6 +7,8 @@ import ij.IJ; import ij.ImagePlus; import ij.ImageStack; +import ij.measure.Calibration; +import io.github.mianalysis.mia.MIA; import io.github.mianalysis.mia.module.Categories; import io.github.mianalysis.mia.module.Category; import io.github.mianalysis.mia.module.Module; @@ -32,52 +34,58 @@ import io.github.mianalysis.mia.object.system.Status; import io.github.mianalysis.mia.process.deepimagej.PrepareDeepImageJ; - /** -* Uses DeepImageJ to run Tensorflow and Pytorch models from the BioImage Model Zoo. This module will detect and run any models already installed in the active copy of Fiji. -*/ + * Uses DeepImageJ to run + * Tensorflow and Pytorch models from the + * BioImage Model Zoo. This module will + * detect and run any models already installed in the active copy of Fiji. + */ @Plugin(type = Module.class, priority = Priority.LOW, visible = true) public class ApplyDeepImageJModel extends Module { - /** - * - */ + /** + * + */ public static final String INPUT_SEPARATOR = "Image input/output"; - /** - * Image from the workspace to apply deep learning model to. - */ + /** + * Image from the workspace to apply deep learning model to. + */ public static final String INPUT_IMAGE = "Input image"; - /** - * - */ + /** + * + */ public static final String AXES_ORDER = "Axes order"; - /** - * Final image generated by model, which will be stored in the workspace with this name. - */ + /** + * Final image generated by model, which will be stored in the workspace with + * this name. + */ public static final String OUTPUT_IMAGE = "Output image"; - - /** - * - */ + /** + * + */ public static final String MODEL_SEPARATOR = "Model controls"; - /** - * Model to apply to input image. This can be any model currently installed in MIA. When using MIA's GUI, the available modules will automatically appear as options. - */ + /** + * Model to apply to input image. This can be any model currently installed in + * MIA. When using MIA's GUI, the available modules will automatically appear as + * options. + */ public static final String MODEL = "Model"; - /** - * If post-processing routines are available for the chosen model this option will be visible. Note: If pre-processing routines are available, these will always be applied. - */ + /** + * If post-processing routines are available for the chosen model this option + * will be visible. Note: If pre-processing routines are available, these will + * always be applied. + */ public static final String USE_POSTPROCESSING = "Use postprocessing"; - /** - * - */ + /** + * + */ public static final String PATCH_SIZE = "Patch size"; private String currModelName = ""; @@ -119,8 +127,6 @@ protected Status process(Workspace workspace) { Image inputImage = workspace.getImage(inputImageName); ImagePlus inputIpl = inputImage.getImagePlus(); - ImagePlus outputIpl = inputIpl.duplicate(); - // Running deep learning model DeepImageJ model = PrepareDeepImageJ.getModel(modelName); @@ -134,20 +140,60 @@ protected Status process(Workspace workspace) { String format = PrepareDeepImageJ.getFormats(modelName)[0]; PrepareDeepImageJ pDIJ = new PrepareDeepImageJ(); - ImageStack istIn = inputIpl.getStack(); - ImageStack istOut = outputIpl.getStack(); - - for (int i = 0; i < istIn.size(); i++) { - inputIpl = new ImagePlus("Temp", istIn.getProcessor(i + 1)); - ImagePlus tempOutputIpl = pDIJ.runModel(inputIpl, model, format, usePreprocessing, usePostprocessing, patchSize); - istOut.setProcessor(tempOutputIpl.getProcessor(),i+1); - - writeProgressStatus(i+1, istIn.size(), "slices"); - + ImageStack inputIst = inputIpl.getStack(); + ImagePlus outputIpl = null; + ImageStack outputIst = null; + + int count = 0; + for (int z = 0; z < inputIpl.getNSlices(); z++) { + for (int t = 0; t < inputIpl.getNFrames(); t++) { + int inputIdx = inputIpl.getStackIndex(1, z + 1, t + 1); + ImagePlus tempIpl = new ImagePlus("Temp", inputIst.getProcessor(inputIdx)); + ImagePlus tempOutputIpl = pDIJ.runModel(tempIpl, model, format, usePreprocessing, usePostprocessing, + patchSize); + + // If it hasn't already been created (i.e. this is the first slice), create output ImagePlus + if (outputIpl == null) { + int width = tempOutputIpl.getWidth(); + int height = tempOutputIpl.getHeight(); + int nChannels = tempOutputIpl.getNChannels(); + int nSlices = inputIpl.getNSlices(); + int nFrames = inputIpl.getNFrames(); + + outputIpl = IJ.createHyperStack(outputImageName, width, height, nChannels, nSlices, nFrames, 32); + + Calibration inputCal = inputIpl.getCalibration(); + Calibration outputCal = new Calibration(); + outputCal.pixelHeight = inputCal.pixelHeight; + outputCal.pixelWidth = inputCal.pixelWidth; + outputCal.pixelDepth = inputCal.pixelDepth; + outputCal.setUnit(inputCal.getUnits()); + outputCal.setTimeUnit(inputCal.getTimeUnit()); + outputCal.fps = inputCal.fps; + outputCal.frameInterval = inputCal.frameInterval; + outputIpl.setCalibration(outputCal); + + outputIst = outputIpl.getStack(); + + } + + ImageStack tempIst = tempOutputIpl.getStack(); + for (int c=0;c Date: Thu, 23 May 2024 14:57:51 +0100 Subject: [PATCH 4/5] Removed unused main methods from classes --- .vscode/launch.json | 49 ---- .../process/activecontour/ActiveContour.java | 75 ------ .../transforms/CircleTransform.java | 21 -- .../transforms/RectangleTransform.java | 23 -- .../transforms/SphereTransform.java | 13 - .../mia/process/skeleton/Skeleton.java | 20 -- .../CommaSeparatedStringInterpreter.java | 7 - .../mia/process/voxel/SphereShell.java | 20 -- .../mia/process/voxel/SphereSolid.java | 20 -- .../signalprocesser/shared/StatusDialog.java | 4 - .../voronoi/VoronoiAlgorithm.java | 9 +- .../signalprocesser/voronoi/VoronoiTest.java | 13 - .../binarysearchtreeimpl/debug/DebugTree.java | 13 +- .../voronoi/tools/CountryData.java | 7 +- .../voronoi/tools/TestSuite.java | 13 - .../process/tools/EllipsoidCalculator.java | 84 ------ .../java/io/github/mianalysis/mia/MIA.java | 22 -- .../process/deepimagej/PrepareDeepImageJ.java | 2 +- .../mia/module/inputoutput/ImageLoader.java | 8 - .../objects/process/FitActiveContours.java | 14 - .../objects/relate/RelateManyToMany.java | 5 - .../module/objects/relate/RelateOneToOne.java | 5 - mia-plugin/pom.xml.versionsBackup | 246 ------------------ .../threshold/LiveManualThreshold.java | 12 - .../filter/LiveFilterByMeasurement.java | 12 - 25 files changed, 4 insertions(+), 713 deletions(-) delete mode 100644 mia-algorithms/src/main/java/io/github/mianalysis/mia/process/activecontour/ActiveContour.java delete mode 100644 mia-plugin/pom.xml.versionsBackup diff --git a/.vscode/launch.json b/.vscode/launch.json index 8e7f918d9..c3017fe31 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,60 +1,11 @@ { "configurations": [ - { - "type": "java", - "name": "AnalysisReader", - "request": "launch", - "mainClass": "io.github.mianalysis.mia.process.analysishandling.AnalysisReader", - "projectName": "mia-core" - }, - { - "type": "java", - "name": "MinimalExample", - "request": "launch", - "mainClass": "io.github.mianalysis.mia.module.MinimalExample", - "projectName": "mia-modules" - }, - { - "type": "java", - "name": "MinimalExample", - "request": "launch", - "mainClass": "MinimalExample", - "projectName": "pom-mia" - }, - { - "type": "java", - "name": "MinimalExample", - "request": "launch", - "mainClass": "io.github.mianalysis.example.MinimalExample", - "projectName": "mia-examples" - }, - { - "type": "java", - "name": "MIA", - "request": "launch", - "mainClass": "io.github.mianalysis.mia.MIA", - "projectName": "mia-core" - }, { "type": "java", "name": "MIA_", "request": "launch", "mainClass": "io.github.mianalysis.mia.MIA_", "projectName": "mia-plugin" - }, - { - "type": "java", - "name": "MIA", - "request": "launch", - "mainClass": "io.github.mianalysis.mia.MIA", - "projectName": "mia" - }, - { - "type": "java", - "name": "RunScript", - "request": "launch", - "mainClass": "io.github.mianalysis.mia.module.script.RunScript", - "projectName": "mia" } ] } \ No newline at end of file diff --git a/mia-algorithms/src/main/java/io/github/mianalysis/mia/process/activecontour/ActiveContour.java b/mia-algorithms/src/main/java/io/github/mianalysis/mia/process/activecontour/ActiveContour.java deleted file mode 100644 index 9730425d0..000000000 --- a/mia-algorithms/src/main/java/io/github/mianalysis/mia/process/activecontour/ActiveContour.java +++ /dev/null @@ -1,75 +0,0 @@ -package io.github.mianalysis.mia.process.activecontour; - -import java.awt.Polygon; - -import ij.IJ; -import ij.ImageJ; -import ij.ImagePlus; -import ij.gui.Overlay; -import ij.gui.Roi; -import ij.plugin.Duplicator; -import io.github.mianalysis.mia.process.activecontour.energies.BendingEnergy; -import io.github.mianalysis.mia.process.activecontour.energies.ElasticEnergy; -import io.github.mianalysis.mia.process.activecontour.energies.EnergyCollection; -import io.github.mianalysis.mia.process.activecontour.energies.PathEnergy; -import io.github.mianalysis.mia.process.activecontour.minimisers.GreedyMinimiser; -import io.github.mianalysis.mia.process.activecontour.physicalmodel.NodeCollection; -import io.github.mianalysis.mia.process.activecontour.visualisation.GridOverlay; - -/** - * Created by Stephen on 08/09/2016. - */ -public class ActiveContour { - public static void main(String[] args) throws InterruptedException { - new ImageJ(); - IJ.runMacro("waitForUser"); - - ImagePlus ipl = IJ.getImage(); - Roi roi = ipl.getRoi(); - - Polygon roiPoly = roi.getPolygon(); - int[] xCoords = roiPoly.xpoints; - int[] yCoords = roiPoly.ypoints; - - // Reducing the number of points per contour - int div = 5; - int[] xCoordsSub = new int[(int) Math.floor(xCoords.length/div)]; - int[] yCoordsSub = new int[(int) Math.floor(yCoords.length/div)]; - - for (int i=0;i objects = transform.getObjects(10000, 100); - transform.addDetectedObjectsOverlay(ipl, objects); - - ipl.show(); - IJ.runMacro("waitForUser"); - - } - public CircleTransform(ImageProcessor ipr, String[] parameterRanges) { super(ipr); diff --git a/mia-algorithms/src/main/java/io/github/mianalysis/mia/process/houghtransform/transforms/RectangleTransform.java b/mia-algorithms/src/main/java/io/github/mianalysis/mia/process/houghtransform/transforms/RectangleTransform.java index 32c3f77ea..3033e2c62 100644 --- a/mia-algorithms/src/main/java/io/github/mianalysis/mia/process/houghtransform/transforms/RectangleTransform.java +++ b/mia-algorithms/src/main/java/io/github/mianalysis/mia/process/houghtransform/transforms/RectangleTransform.java @@ -4,9 +4,6 @@ import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; -import ij.IJ; -import ij.ImageJ; -import ij.ImagePlus; import ij.process.ImageProcessor; import io.github.mianalysis.mia.process.houghtransform.accumulators.RectangleAccumulator; import io.github.mianalysis.mia.process.string.CommaSeparatedStringInterpreter; @@ -16,26 +13,6 @@ * Created by sc13967 on 12/01/2018. */ public class RectangleTransform extends AbstractTransform { - public static void main(String[] args) { - new ImageJ(); - ImagePlus ipl = IJ.openImage("C:/Users/steph/Desktop/TEST_HoughRectangle.tif"); - ImageProcessor ipr = ipl.getProcessor(); - String[] parameterRanges = new String[] { "0-end", "0-end", "70", "130-170-5", "0-360-60" }; - - RectangleTransform transform = new RectangleTransform(ipr, parameterRanges); - transform.setnThreads(4); - transform.run(); - - transform.getAccumulatorAsImage().show(); - - // ArrayList objects = transform.getObjects(8000, 500); - // transform.addDetectedObjectsOverlay(ipl, objects); - - ipl.show(); - IJ.runMacro("waitForUser"); - - } - public RectangleTransform(ImageProcessor ipr, String[] parameterRanges) { super(ipr); diff --git a/mia-algorithms/src/main/java/io/github/mianalysis/mia/process/houghtransform/transforms/SphereTransform.java b/mia-algorithms/src/main/java/io/github/mianalysis/mia/process/houghtransform/transforms/SphereTransform.java index 25d1653a6..c2d12cc50 100644 --- a/mia-algorithms/src/main/java/io/github/mianalysis/mia/process/houghtransform/transforms/SphereTransform.java +++ b/mia-algorithms/src/main/java/io/github/mianalysis/mia/process/houghtransform/transforms/SphereTransform.java @@ -14,19 +14,6 @@ * Created by sc13967 on 12/01/2018. */ public class SphereTransform extends AbstractTransform { - - // public static void main(String[] args) { - // new ImageJ(); - // ImagePlus ipl = IJ.openImage("C:/Users/steph/Desktop/TEST_HoughSphere.tif"); - // ImageStack ist = ipl.getStack(); - // String[] paramRanges = new String[] { "0-end", "0-end", "0-end", "15-25-1" }; - // SphereTransform sht = new SphereTransform(ist, paramRanges); - // sht.run(); - // sht.getAccumulatorAsImage().show(); - // sht.addDetectedObjectsOverlay(ipl, sht.getObjects(10, 100)); - // ipl.show(); - // } - public SphereTransform(ImageStack ist, String[] parameterRanges) { super(ist); diff --git a/mia-algorithms/src/main/java/io/github/mianalysis/mia/process/skeleton/Skeleton.java b/mia-algorithms/src/main/java/io/github/mianalysis/mia/process/skeleton/Skeleton.java index b4a9de737..d88909b50 100644 --- a/mia-algorithms/src/main/java/io/github/mianalysis/mia/process/skeleton/Skeleton.java +++ b/mia-algorithms/src/main/java/io/github/mianalysis/mia/process/skeleton/Skeleton.java @@ -17,26 +17,6 @@ public class Skeleton extends VertexCollection { private double longestDistance; private ArrayList longestPath; - -// public static void main(String[] args) { -// new ImageJ(); -// -// ImagePlus ipl = IJ.openImage("C:\\Users\\sc13967\\Downloads\\FakeFish.tif"); -// ipl.show(); -// -// Skeleton skeleton = new Skeleton(ipl); -// -// LinkedHashSet longestPath = skeleton.getLongestPath(); -// CurvatureCalculator curvatureCalculator = new CurvatureCalculator(longestPath); -// curvatureCalculator.setFittingMethod(CurvatureCalculator.FittingMethod.LOESS); -// curvatureCalculator.setLoessNNeighbours(10); -// curvatureCalculator.setLoessIterations(10000); -// curvatureCalculator.setLoessAccuracy(1); -// TreeMap curvature = curvatureCalculator.getCurvature(); -// curvatureCalculator.showOverlay(ipl,new int[]{1,1,1},2); -// -// } - public Skeleton(ImagePlus ipl) { for (int x=0;x//GEN-END:initComponents - public static void main(String args[]) { - StatusDialog dialog = new StatusDialog(new JFrame(), "Title", "Caption"); - dialog.setVisible(true); - } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel lblCaption; diff --git a/mia-algorithms/src/main/java/signalprocesser/voronoi/VoronoiAlgorithm.java b/mia-algorithms/src/main/java/signalprocesser/voronoi/VoronoiAlgorithm.java index ffe1a5aad..b50903009 100644 --- a/mia-algorithms/src/main/java/signalprocesser/voronoi/VoronoiAlgorithm.java +++ b/mia-algorithms/src/main/java/signalprocesser/voronoi/VoronoiAlgorithm.java @@ -31,14 +31,7 @@ import signalprocesser.voronoi.statusstructure.VLinkedNode; public class VoronoiAlgorithm { - - /* ********************************************************* */ - // Test Main Function - - public static void main(String[] args) { - VoronoiTest.main(args); - } - + private VoronoiAlgorithm() { } /* ********************************************************* */ diff --git a/mia-algorithms/src/main/java/signalprocesser/voronoi/VoronoiTest.java b/mia-algorithms/src/main/java/signalprocesser/voronoi/VoronoiTest.java index 0614655d2..936e5401b 100644 --- a/mia-algorithms/src/main/java/signalprocesser/voronoi/VoronoiTest.java +++ b/mia-algorithms/src/main/java/signalprocesser/voronoi/VoronoiTest.java @@ -106,20 +106,7 @@ public class VoronoiTest extends javax.swing.JFrame { private TestRepresentationWrapper representationwrapper = new TestRepresentationWrapper(); private AbstractRepresentation representation; - - public static void main(String args[]) { - // Set look and feel - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (Exception e) { - displayError(null, e); - } - // Load the application - VoronoiTest frame = new VoronoiTest(); - frame.setVisible(true); - } - /** Creates new form MainFrame */ public VoronoiTest() { // Inital components diff --git a/mia-algorithms/src/main/java/signalprocesser/voronoi/statusstructure/binarysearchtreeimpl/debug/DebugTree.java b/mia-algorithms/src/main/java/signalprocesser/voronoi/statusstructure/binarysearchtreeimpl/debug/DebugTree.java index af1e978d4..7199f9b50 100644 --- a/mia-algorithms/src/main/java/signalprocesser/voronoi/statusstructure/binarysearchtreeimpl/debug/DebugTree.java +++ b/mia-algorithms/src/main/java/signalprocesser/voronoi/statusstructure/binarysearchtreeimpl/debug/DebugTree.java @@ -159,18 +159,7 @@ public void windowClosed(java.awt.event.WindowEvent evt) { private void formWindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosed //System.exit(0); }//GEN-LAST:event_formWindowClosed - - public static void main(String args[]) { - DebugTree app = new DebugTree(new javax.swing.JFrame()); - app.setVisible(true); - VInternalNode node = new VInternalNode(); - VLeafNode leaf1 = new VLeafNode(new VSiteEvent(new VPoint(1,2))); - VLeafNode leaf2 = new VLeafNode(new VSiteEvent(new VPoint(1,2))); - node.setLeft(leaf1); - node.setRight(leaf2); - app.setRootNode(node, 10); - } - + // Variables declaration - do not modify//GEN-BEGIN:variables // End of variables declaration//GEN-END:variables diff --git a/mia-algorithms/src/main/java/signalprocesser/voronoi/tools/CountryData.java b/mia-algorithms/src/main/java/signalprocesser/voronoi/tools/CountryData.java index 4b138d140..a4af00b90 100644 --- a/mia-algorithms/src/main/java/signalprocesser/voronoi/tools/CountryData.java +++ b/mia-algorithms/src/main/java/signalprocesser/voronoi/tools/CountryData.java @@ -39,12 +39,7 @@ public class CountryData { public static final String INDEX_FILE = PATH_TO_COUNTRYDATA + "/fileindex.dat"; public static final Pattern PATTERN_COORDLINE = Pattern.compile("^[ ]*([0-9E.-]*)[ ]*,[ ]*([0-9E.-]*)[ ]*$"); - - public static void main(String args[]) throws IOException, URISyntaxException { - // Call country data generation to generate mapping data - //CountryDataGeneration.main(args); - } - + public static ArrayList getCountryList() throws IOException { // Open the index file InputStream stream = CountryData.class.getResourceAsStream(INDEX_FILE); diff --git a/mia-algorithms/src/main/java/signalprocesser/voronoi/tools/TestSuite.java b/mia-algorithms/src/main/java/signalprocesser/voronoi/tools/TestSuite.java index e5b1bae7c..da2f22d8e 100644 --- a/mia-algorithms/src/main/java/signalprocesser/voronoi/tools/TestSuite.java +++ b/mia-algorithms/src/main/java/signalprocesser/voronoi/tools/TestSuite.java @@ -1495,20 +1495,7 @@ private void optLetterGenerationActionPerformed(java.awt.event.ActionEvent evt) panelGenerationSelection.validate(); panelGenerationSelection.repaint(); }//GEN-LAST:event_optLetterGenerationActionPerformed - - public static void main(String args[]) { - // Set look and feel - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (Exception e) { - displayError(null, e); - } - // Load test form - TestSuite dialog = new TestSuite(true, new javax.swing.JFrame()); - dialog.setVisible(true); - } - private void runTestSuite(final RunTestSeries testseries) { // Update status lblStatus.setText("Starting test suite run..."); diff --git a/mia-bonej/src/main/java/io/github/mianalysis/mia/module/objects/process/tools/EllipsoidCalculator.java b/mia-bonej/src/main/java/io/github/mianalysis/mia/module/objects/process/tools/EllipsoidCalculator.java index 85c2e5dab..a131b746a 100644 --- a/mia-bonej/src/main/java/io/github/mianalysis/mia/module/objects/process/tools/EllipsoidCalculator.java +++ b/mia-bonej/src/main/java/io/github/mianalysis/mia/module/objects/process/tools/EllipsoidCalculator.java @@ -15,90 +15,6 @@ public class EllipsoidCalculator { private final Volume volume; private Ellipsoid ell; - public static void main(String[] args) { - SpatCal spatCal = new SpatCal(1, 1, "px", 200, 200, 20); - Volume vol = new Volume(VolumeType.POINTLIST, spatCal); - - try { - vol.add(83, 81, 4); - vol.add(84, 81, 4); - vol.add(84, 82, 4); - vol.add(85, 82, 4); - vol.add(84, 80, 5); - vol.add(84, 81, 5); - vol.add(84, 82, 5); - vol.add(85, 80, 5); - vol.add(85, 81, 5); - vol.add(85, 82, 5); - vol.add(85, 83, 5); - vol.add(85, 84, 5); - vol.add(86, 80, 5); - vol.add(86, 81, 5); - vol.add(86, 82, 5); - vol.add(86, 83, 5); - vol.add(86, 84, 5); - vol.add(87, 82, 5); - vol.add(87, 83, 5); - vol.add(87, 84, 5); - vol.add(87, 85, 5); - vol.add(88, 83, 5); - vol.add(88, 84, 5); - vol.add(88, 85, 5); - vol.add(85, 83, 6); - vol.add(86, 81, 6); - vol.add(86, 82, 6); - vol.add(86, 83, 6); - vol.add(86, 84, 6); - vol.add(86, 85, 6); - vol.add(87, 82, 6); - vol.add(87, 83, 6); - vol.add(87, 84, 6); - vol.add(87, 85, 6); - vol.add(88, 84, 6); - vol.add(88, 85, 6); - vol.add(83, 83, 7); - - vol.add(84, 82, 7); - vol.add(84, 83, 7); - vol.add(84, 84, 7); - vol.add(85, 82, 7); - vol.add(85, 83, 7); - vol.add(85, 84, 7); - vol.add(85, 85, 7); - vol.add(86, 82, 7); - vol.add(86, 83, 7); - vol.add(86, 84, 7); - vol.add(86, 85, 7); - vol.add(87, 82, 7); - vol.add(87, 83, 7); - vol.add(87, 84, 7); - vol.add(87, 85, 7); - vol.add(88, 85, 7); - - // vol.add(83,82,4); - // vol.add(83,83,4); - // vol.add(84,83,4); - // vol.add(85,81,4); - // vol.add(85,83,4); - // vol.add(83,84,7); - // vol.add(84,85,7); - // vol.add(84,86,7); - // vol.add(85,86,7); - // vol.add(89,85,7); - // vol.add(89,85,7); - - } catch (PointOutOfRangeException e) { - } - - EllipsoidCalculator calculator = new EllipsoidCalculator(vol, 1000); - double[] ori = calculator.getOrientationRads(); - System.out.println("Ori " + ori[0] + "_" + ori[1]); - - double sphericity = calculator.getSphericity(); - System.out.println("Sphericity " + sphericity); - - } - /** * This constructor is package-private. As such, it's intended for testing only. * diff --git a/mia-core/src/main/java/io/github/mianalysis/mia/MIA.java b/mia-core/src/main/java/io/github/mianalysis/mia/MIA.java index df05f5b94..56ca2aea6 100644 --- a/mia-core/src/main/java/io/github/mianalysis/mia/MIA.java +++ b/mia-core/src/main/java/io/github/mianalysis/mia/MIA.java @@ -61,28 +61,6 @@ public abstract class MIA { */ protected static final boolean imagePlusMode = true; - // public static void main(String[] args) throws Exception { - // debug = true; - - // try { - // if (args.length == 0) { - // System.err.println("No workflow file path specified as command line - // argument"); - // } else if (args.length == 1) { - // Analysis analysis = AnalysisReader.loadModules(new File(args[0])); - // new AnalysisRunner().run(analysis); - // } else if (args.length == 2) { - // Analysis analysis = AnalysisReader.loadModules(new File(args[0])); - // analysis.getModules().getInputControl().updateParameterValue(InputControl.INPUT_PATH, - // args[1]); - // new AnalysisRunner().run(analysis); - // } - - // } catch (Exception e) { - // MIA.log.writeError(e); - // } - // } - private static String extractVersion() { // Determining the version number from the pom file try { diff --git a/mia-deepimagej/src/main/java/io/github/mianalysis/mia/process/deepimagej/PrepareDeepImageJ.java b/mia-deepimagej/src/main/java/io/github/mianalysis/mia/process/deepimagej/PrepareDeepImageJ.java index e7fc8dd86..75aa1e1ed 100644 --- a/mia-deepimagej/src/main/java/io/github/mianalysis/mia/process/deepimagej/PrepareDeepImageJ.java +++ b/mia-deepimagej/src/main/java/io/github/mianalysis/mia/process/deepimagej/PrepareDeepImageJ.java @@ -472,10 +472,10 @@ else if (runStage == 2) int minID = 0; while (iter.hasNext()) { Object nx = iter.next(); - // MIA.log.writeDebug("OUTPUT " + nx); if (nx != null && nx instanceof ImagePlus && ((ImagePlus) nx).getProcessor() != null) { ImagePlus currIpl = (ImagePlus) nx; currIpl.hide(); + if (currIpl.getID() < minID) { ipl = currIpl; minID = currIpl.getID(); diff --git a/mia-modules/src/main/java/io/github/mianalysis/mia/module/inputoutput/ImageLoader.java b/mia-modules/src/main/java/io/github/mianalysis/mia/module/inputoutput/ImageLoader.java index 21a52fa3b..c48c657d3 100644 --- a/mia-modules/src/main/java/io/github/mianalysis/mia/module/inputoutput/ImageLoader.java +++ b/mia-modules/src/main/java/io/github/mianalysis/mia/module/inputoutput/ImageLoader.java @@ -425,14 +425,6 @@ public class ImageLoader & NativeType> extends Module { */ public static final String MAX_INPUT_INTENSITY = "Maximum input intensity"; - public static void main(String[] args) throws io.scif.FormatException, IOException { - SCIFIO scifio = new SCIFIO(); - String path = "C:\\Users\\steph\\Desktop\\lumen_area.tif"; - Reader reader = scifio.initializer().initializeReader(new FileLocation(path)); - Plane plane = reader.openPlane(0, 0); - System.out.println(plane.getLengths()[0]); - } - public ImageLoader(Modules modules) { super("Load image", modules); } diff --git a/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/process/FitActiveContours.java b/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/process/FitActiveContours.java index f4d5dbb63..2fd3042cb 100644 --- a/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/process/FitActiveContours.java +++ b/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/process/FitActiveContours.java @@ -444,20 +444,6 @@ void addParameterDescriptions() { parameters.get(SHOW_CONTOURS_REALTIME).setDescription("When selected, the contour evolution will be displayed on the input image in realtime. This may be useful for optimising weight parameters."); } - - public static void main(String[] args) { - BalloonEnergy balloonEnergy = new BalloonEnergy(1); - - Vertex node1 = new Vertex(50, 20); - Vertex node2 = new Vertex(53, 18); - Vertex node3 = new Vertex(54, 14); - - node2.setLeftNeighbour(node1); - node2.setRightNeighbour(node3); - - balloonEnergy.getEnergy(node2); - - } } class BalloonEnergy extends Energy { diff --git a/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/relate/RelateManyToMany.java b/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/relate/RelateManyToMany.java index 197634c47..dea6bdd53 100644 --- a/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/relate/RelateManyToMany.java +++ b/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/relate/RelateManyToMany.java @@ -54,11 +54,6 @@ // return new SparseCostMatrix( cc, kk, number, m ); // } // -// public static void main(String[] args) { -// new RelateOneToOne().testSparseIsNonSparse(); -// -// } -// // public final void testSparseIsNonSparse() { // final int n = 4; // final int m = 6; diff --git a/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/relate/RelateOneToOne.java b/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/relate/RelateOneToOne.java index 52dc94f7d..699f1d1a7 100644 --- a/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/relate/RelateOneToOne.java +++ b/mia-modules/src/main/java/io/github/mianalysis/mia/module/objects/relate/RelateOneToOne.java @@ -54,11 +54,6 @@ // return new SparseCostMatrix( cc, kk, number, m ); // } // -// public static void main(String[] args) { -// new RelateOneToOne().testSparseIsNonSparse(); -// -// } -// // public final void testSparseIsNonSparse() { // final int n = 4; // final int m = 6; diff --git a/mia-plugin/pom.xml.versionsBackup b/mia-plugin/pom.xml.versionsBackup deleted file mode 100644 index c08a2f5a1..000000000 --- a/mia-plugin/pom.xml.versionsBackup +++ /dev/null @@ -1,246 +0,0 @@ - - 4.0.0 - - - io.github.mianalysis - pom-mia - 1.5.0-SNAPSHOT - - - io.github.mianalysis - mia-plugin - 1.5.0-SNAPSHOT - jar - mia-plugin - https://github.com/mianalysis/mia - 2017 - ModularImageAnalysis (MIA) is an ImageJ plugin which provides a modular framework for assembling image and object analysis workflows. Detected objects can be transformed, filtered, measured and related. Analysis workflows are batch-enabled by default, allowing easy processing of high-content datasets. - - University of Bristol - - - - - GNU General Public License v3+ - http://www.gnu.org/licenses/gpl.html - repo - - - - - - sjcross - Stephen Cross - - founder - lead - developer - debugger - reviewer - support - maintainer - - - - jdjfisher - Jordan Fisher - - developer - - - - glmfisher - Gemma Fisher - - reviewer - support - - - - - - - Gemma Fisher - - support - - - glmfisher - - - - - - GitHub Issues - https://github.com/mianalysis/mia/issues - - - - UTF-8 - false - 1.8 - 1.8 - compile - GNU General Public License v3+ - Stephen Cross - - 3.2.0 - 1.15.0 - 5.11.0 - 1.1.6 - - - - - Image.sc Forum - https://forum.image.sc/tag/modular-image-analysis - - - - - scm:git:git://github.com/mianalysis/mia - scm:git:git@github.com:mianalysis/mia - HEAD - https://github.com/mianalysis/mia - - - - GitHub Actions - https://github.com/mianalysis/mia - - - - - scijava.public - https://maven.scijava.org/content/groups/public - - - - jitpack.io - https://jitpack.io - - - - - - io.github.mianalysis - mia-core - ${project.version} - - - - io.github.mianalysis - mia-modules - ${project.version} - - - - io.github.mianalysis - mia-macros - ${project.version} - - - - io.github.mianalysis - mia-algorithms - ${project.version} - - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - - - - org.apache.maven.plugins - maven-source-plugin - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - - org.apache.maven.plugins - maven-gpg-plugin - - - - org.apache.maven.plugins - maven-jar-plugin - 2.6 - - MIA_-${project.version} - - - true - true - io.github.mianalysis.mia.MIA_ - - - - - - - - org.apache.maven.plugins - maven-shade-plugin - 3.2.1 - - - package - - shade - - - - - - - *:* - - META-INF/*.SF - META-INF/*.DSA - META-INF/*.RSA - - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - 3.0.0 - - - copy-dependencies - package - - copy-dependencies - - - provided - runtime - - - commons-codec,commons-collections4,commons-compress,commons-io,commons-math3,slf4j-api,xml-apis - - - ${project.build.directory}/mia-dependencies/ - false - false - true - - - - - - - \ No newline at end of file diff --git a/mia-plugin/src/main/java/io/github/mianalysis/mia/module/images/process/threshold/LiveManualThreshold.java b/mia-plugin/src/main/java/io/github/mianalysis/mia/module/images/process/threshold/LiveManualThreshold.java index 0e28ef934..aae492cfc 100644 --- a/mia-plugin/src/main/java/io/github/mianalysis/mia/module/images/process/threshold/LiveManualThreshold.java +++ b/mia-plugin/src/main/java/io/github/mianalysis/mia/module/images/process/threshold/LiveManualThreshold.java @@ -89,18 +89,6 @@ public class LiveManualThreshold extends Module { public interface BinaryLogic extends BinaryLogicInterface { } - public static void main(String[] args) { - // Creating a new instance of ImageJ - new ij.ImageJ(); - - // Launching MIA - new ImageJ().command().run("io.github.mianalysis.mia.MIA", false); - - // Adding the current module to MIA's list of available modules. - AvailableModules.addModuleName(LiveManualThreshold.class); - - } - public LiveManualThreshold(Modules modules) { // The first argument is the name by which the module will be seen in the GUI. super("Live manual threshold", modules); diff --git a/mia-plugin/src/main/java/io/github/mianalysis/mia/module/objects/filter/LiveFilterByMeasurement.java b/mia-plugin/src/main/java/io/github/mianalysis/mia/module/objects/filter/LiveFilterByMeasurement.java index a13543642..8376ddf76 100644 --- a/mia-plugin/src/main/java/io/github/mianalysis/mia/module/objects/filter/LiveFilterByMeasurement.java +++ b/mia-plugin/src/main/java/io/github/mianalysis/mia/module/objects/filter/LiveFilterByMeasurement.java @@ -68,18 +68,6 @@ public class LiveFilterByMeasurement extends AbstractObjectFilter { public interface FilterMethods extends AbstractNumericObjectFilter.FilterMethods { } - public static void main(String[] args) { - // Creating a new instance of ImageJ - new ij.ImageJ(); - - // Launching MIA - new ImageJ().command().run("io.github.mianalysis.mia.MIA", false); - - // Adding the current module to MIA's list of available modules. - AvailableModules.addModuleName(LiveFilterByMeasurement.class); - - } - public LiveFilterByMeasurement(Modules modules) { // The first argument is the name by which the module will be seen in the GUI. super("Live measurement filter", modules); From 6d2a4c795664687643f9cf7669fd9d30c7122282 Mon Sep 17 00:00:00 2001 From: Stephen Cross Date: Fri, 24 May 2024 10:17:11 +0100 Subject: [PATCH 5/5] Bugfixes before v1.6.0 --- target/site/dependencies.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/site/dependencies.html b/target/site/dependencies.html index bf60c4a0d..2bbb0576b 100644 --- a/target/site/dependencies.html +++ b/target/site/dependencies.html @@ -1,5 +1,5 @@ - + @@ -24,7 +24,7 @@