diff --git a/pom.xml b/pom.xml index 5cafa5a2..70e3e6f7 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ ljp functional-bioimage_core - 1.4.7-SNAPSHOT + 1.5-SNAPSHOT functional-bioimage-core Bacteria Analyzer diff --git a/src/main/java/boa/core/generateXP/GenerateMutationDynamicsXP.java b/src/main/java/boa/core/generateXP/GenerateMutationDynamicsXP.java index 841ccc15..67eb6c05 100644 --- a/src/main/java/boa/core/generateXP/GenerateMutationDynamicsXP.java +++ b/src/main/java/boa/core/generateXP/GenerateMutationDynamicsXP.java @@ -60,7 +60,7 @@ import boa.plugins.plugins.processing_scheme.SegmentAndTrack; import boa.plugins.plugins.processing_scheme.SegmentThenTrack; import boa.plugins.plugins.segmenters.BacteriaIntensity; -import boa.plugins.plugins.segmenters.MicroChannelFluo2D; +import boa.plugins.plugins.segmenters.MicrochannelFluo2D; import boa.plugins.plugins.segmenters.MutationSegmenter; import boa.plugins.plugins.trackers.MutationTracker; import boa.plugins.plugins.trackers.MicrochannelTracker; @@ -172,7 +172,7 @@ public static Experiment generateXPFluo(String name, String outputDir, boolean s Structure mutation = new Structure("Mutation", 0, mutChan); // parent structure 1 segParentStructure 0 xp.getStructures().insert(mc, bacteria, mutation); - mc.setProcessingScheme(new SegmentAndTrack(new MicrochannelTracker().setSegmenter(new MicroChannelFluo2D()))); + mc.setProcessingScheme(new SegmentAndTrack(new MicrochannelTracker().setSegmenter(new MicrochannelFluo2D()))); //bacteria.setProcessingScheme(new SegmentAndTrack(new BacteriaClosedMicrochannelTrackerLocalCorrections(new BacteriaFluo()).setCostParameters(0.1, 0.5))); bacteria.setProcessingScheme(new SegmentThenTrack(new BacteriaIntensity(), new BacteriaClosedMicrochannelTrackerLocalCorrections().setCostParameters(0.1, 0.5))); mutation.setProcessingScheme(new SegmentAndTrack( diff --git a/src/main/java/boa/core/generateXP/GenerateXP.java b/src/main/java/boa/core/generateXP/GenerateXP.java index adab90f1..0fe955cd 100644 --- a/src/main/java/boa/core/generateXP/GenerateXP.java +++ b/src/main/java/boa/core/generateXP/GenerateXP.java @@ -66,7 +66,7 @@ import boa.plugins.plugins.processing_scheme.SegmentOnly; import boa.plugins.plugins.processing_scheme.SegmentThenTrack; import boa.plugins.plugins.segmenters.BacteriaIntensity; -import boa.plugins.plugins.segmenters.MicroChannelFluo2D; +import boa.plugins.plugins.segmenters.MicrochannelFluo2D; import boa.plugins.plugins.segmenters.MicrochannelPhase2D; import boa.plugins.plugins.segmenters.MutationSegmenter; import boa.plugins.plugins.thresholders.IJAutoThresholder; @@ -479,8 +479,7 @@ public static void setParametersFluo(Experiment xp, boolean processing, boolean mutation.setSegmentationParentStructure(1); if (processing) { mc.setProcessingScheme(new SegmentAndTrack( - new MicrochannelTracker().setSegmenter( - new MicroChannelFluo2D() + new MicrochannelTracker().setSegmenter(new MicrochannelFluo2D() ).setTrackingParameters(40, 0.5).setYShiftQuantile(0.05) ).addTrackPostFilters(new RemoveMicrochannelsTouchingBackgroundOnSides(2), new RemoveMicrochannelsWithOverexpression(99, 5).setTrim(true), diff --git a/src/main/java/boa/plugins/PluginFactory.java b/src/main/java/boa/plugins/PluginFactory.java index 37a80e32..39ca9328 100644 --- a/src/main/java/boa/plugins/PluginFactory.java +++ b/src/main/java/boa/plugins/PluginFactory.java @@ -46,7 +46,7 @@ public class PluginFactory { private final static TreeMap plugins = new TreeMap<>(); private final static Logger logger = LoggerFactory.getLogger(PluginFactory.class); - private final static Map refactoredNamesOldMapNew = new HashMap(){{put("BacteriaFluo", "BacteriaIntensity");}}; + private final static Map refactoredNamesOldMapNew = new HashMap(){{put("BacteriaFluo", "BacteriaIntensity");put("MicroChannelFluo2D", "MicrochannelFluo2D");put("LAPTracker", "MutationTracker");put("MutationSegmenter", "MutationSegmenter");}}; public static void findPlugins(String packageName) { logger.info("looking for plugin in package: {}", packageName); diff --git a/src/main/java/boa/plugins/plugins/segmenters/MicroChannelFluo2D.java b/src/main/java/boa/plugins/plugins/segmenters/MicrochannelFluo2D.java similarity index 97% rename from src/main/java/boa/plugins/plugins/segmenters/MicroChannelFluo2D.java rename to src/main/java/boa/plugins/plugins/segmenters/MicrochannelFluo2D.java index 8bcadf5f..3e939848 100644 --- a/src/main/java/boa/plugins/plugins/segmenters/MicroChannelFluo2D.java +++ b/src/main/java/boa/plugins/plugins/segmenters/MicrochannelFluo2D.java @@ -55,7 +55,7 @@ * * @author jollion */ -public class MicroChannelFluo2D implements MicrochannelSegmenter, TrackParametrizable, ToolTip { +public class MicrochannelFluo2D implements MicrochannelSegmenter, TrackParametrizable, ToolTip { NumberParameter channelHeight = new BoundedNumberParameter("Microchannel Height", 0, 430, 5, null).setToolTipText("Height of microchannel in pixels"); NumberParameter channelWidth = new BoundedNumberParameter("Microchannel Width", 0, 40, 5, null); @@ -69,9 +69,9 @@ public class MicroChannelFluo2D implements MicrochannelSegmenter, TrackParametri + "
  1. Rough segmentation of cells using \"Threshold\" computed the whole track prior to segmentation step
  2. " + "
  3. Selection of filled channels: lengh in X direction should be over \"Microchannel Height\" x \"Microchannel filling proportion\"
  4. " + "
  5. Computation of Y start: min value of the min y coordinate of the selected objects at step 2
"; - public MicroChannelFluo2D() {} + public MicrochannelFluo2D() {} - public MicroChannelFluo2D(int channelHeight, int channelWidth, int yMargin, double fillingProportion, int minObjectSize) { + public MicrochannelFluo2D(int channelHeight, int channelWidth, int yMargin, double fillingProportion, int minObjectSize) { this.channelHeight.setValue(channelHeight); this.channelWidth.setValue(channelWidth); this.yShift.setValue(yMargin); @@ -105,7 +105,7 @@ public Parameter[] getParameters() { @Override - public ApplyToSegmenter run(int structureIdx, List parentTrack) { + public ApplyToSegmenter run(int structureIdx, List parentTrack) { double thld = TrackParametrizable.getGlobalThreshold(structureIdx, parentTrack, this.threshold.instanciatePlugin()); return (p, s)->s.thresholdValue=thld; } diff --git a/src/main/java/boa/plugins/plugins/transformations/CropMicroChannelFluo2D.java b/src/main/java/boa/plugins/plugins/transformations/CropMicroChannelFluo2D.java index 6a08453e..c94dcd56 100644 --- a/src/main/java/boa/plugins/plugins/transformations/CropMicroChannelFluo2D.java +++ b/src/main/java/boa/plugins/plugins/transformations/CropMicroChannelFluo2D.java @@ -60,7 +60,7 @@ import boa.utils.Utils; import static boa.utils.Utils.plotProfile; import boa.plugins.OverridableThresholdMap; -import boa.plugins.plugins.segmenters.MicroChannelFluo2D; +import boa.plugins.plugins.segmenters.MicrochannelFluo2D; import boa.plugins.MicrochannelSegmenter.Result; /** @@ -110,7 +110,7 @@ public BoundingBox getBoundingBox(Image image) { public BoundingBox getBoundingBox(Image image, ImageInteger thresholdedImage, double threshold) { if (debug) testMode = true; - Result r = MicroChannelFluo2D.segmentMicroChannels(image, thresholdedImage, 0, 0, this.channelHeight.getValue().intValue(), this.fillingProportion.getValue().doubleValue(), threshold, this.minObjectSize.getValue().intValue(), testMode); + Result r = MicrochannelFluo2D.segmentMicroChannels(image, thresholdedImage, 0, 0, this.channelHeight.getValue().intValue(), this.fillingProportion.getValue().doubleValue(), threshold, this.minObjectSize.getValue().intValue(), testMode); if (r == null) return null; int cropMargin = this.cropMarginY.getValue().intValue(); int xStart = this.xStart.getValue().intValue(); diff --git a/src/test/java/boa/processing/test/TestProcessMicrochannels.java b/src/test/java/boa/processing/test/TestProcessMicrochannels.java index 9313d3a9..b231bcbb 100644 --- a/src/test/java/boa/processing/test/TestProcessMicrochannels.java +++ b/src/test/java/boa/processing/test/TestProcessMicrochannels.java @@ -38,7 +38,7 @@ import boa.plugins.PluginFactory; import boa.plugins.Segmenter; import boa.plugins.plugins.segmenters.BacteriaIntensity; -import boa.plugins.plugins.segmenters.MicroChannelFluo2D; +import boa.plugins.plugins.segmenters.MicrochannelFluo2D; import boa.plugins.plugins.transformations.CropMicroChannelFluo2D; import boa.plugins.OverridableThresholdMap; @@ -64,7 +64,7 @@ public static void testSegMicrochannelsFromXP(String dbName, int fieldNumber, in StructureObject root = mDAO.getDao(f.getName()).getRoot(timePoint); logger.debug("field name: {}, root==null? {} frame: {}", f.getName(), root==null, root.getFrame()); Image input = root.getRawImage(0); - MicroChannelFluo2D.debug=true; + MicrochannelFluo2D.debug=true; CropMicroChannelFluo2D.debug=true; //ObjectPopulation pop = MicroChannelFluo2D.run(input, 355, 40, 20, 50, 0.6d, 100); //ObjectPopulation pop = MicroChannelFluo2D.run2(input, 355, 40, 20);