Commit 0826c080 authored by Aliaksandr Halavatyi's avatar Aliaksandr Halavatyi
Browse files

fill pixels with 0 out of the well area on Low-zoom image

parent d5dfcd79
......@@ -88,9 +88,9 @@ public class Job_SelectMultipleEmbryosAutoRotation extends Job_Default{
private double embryoMinAR=1.8;
private double embryoMaxAR=10.0;
private double embryoMinCircularity=0.0;
private double embryoMinCircularity=0.3;
private double embryoMaxCircularity=1.0;
private double embryoMinSolidity=0.0;
private double embryoMinSolidity=0.7;
private double embryoMaxSolidity=1.0;
......@@ -204,10 +204,15 @@ public class Job_SelectMultipleEmbryosAutoRotation extends Job_Default{
}
private void identifyEmbryos(ImagePlus _embryoImage)throws Exception {
new RankFilters().rank(_embryoImage.getProcessor(), embryoFluorFilterRadius, RankFilters.MEDIAN);
ImageProcessor embryoProcessor = _embryoImage.getProcessor();
new RankFilters().rank(embryoProcessor, embryoFluorFilterRadius, RankFilters.MEDIAN);
this.showDebug(_embryoImage, "Image for embryo segmentation", true);
ImageProcessor maskProcessor=new MaximumFinder().findMaxima(_embryoImage.getProcessor(),watershedTolerance,embryoFluorThreshold,MaximumFinder.SEGMENTED,false,false);
//exclude particles outside ROI by filling with 0
embryoProcessor.setColor(0);
embryoProcessor.fillOutside(wellRoi);
ImageProcessor maskProcessor=new MaximumFinder().findMaxima(embryoProcessor,watershedTolerance,embryoFluorThreshold,MaximumFinder.SEGMENTED,false,false);
ImagePlus watershedMaskImage=new ImagePlus("Embryo Mask Image", maskProcessor);
......@@ -228,7 +233,7 @@ public class Job_SelectMultipleEmbryosAutoRotation extends Job_Default{
Roi[] identifiedRois=rm.getRoisAsArray();
ParticleFilterer embryoFilter=new ParticleFilterer(_embryoImage.getProcessor(), identifiedRois);
embryoFilter.filterInRoi(wellRoi);
//embryoFilter.filterInRoi(wellRoi); exclude particles outside ROI by filling with 0 before
embryoFilter.filterThr(ParticleFilterer.MEAN, embryoMinMeanIntensity, embryoMaxMeanIntensity);
embryoFilter.filterThr(ParticleFilterer.MEDIAN, embryoMinMedianIntensity, embryoMaxMedianIntensity);
embryoFilter.filterThr(ParticleFilterer.ASPECT_RATIO, embryoMinAR, embryoMaxAR);
......@@ -330,7 +335,6 @@ public class Job_SelectMultipleEmbryosAutoRotation extends Job_Default{
jobCollection.addParameter(KEY_EMBRYO_MIN_SOLIDITY, null, embryoMinSolidity, ParameterType.DOUBLE_PARAMETER);
jobCollection.addParameter(KEY_EMBRYO_MAX_SOLIDITY, null, embryoMaxSolidity, ParameterType.DOUBLE_PARAMETER);
jobCollection.addParameter(KEY_EMBRYO_MAX_COUNT,null, embryoMaxCount, ParameterType.INT_PARAMETER);
jobCollection.addParameter(KEY_WAIT_IMAGE_OPENING,null, imageOpeningTimeDelay, ParameterType.INT_PARAMETER);
......@@ -381,8 +385,8 @@ public class Job_SelectMultipleEmbryosAutoRotation extends Job_Default{
// start ImageJ
new ImageJ();
String tblPth="Z:/halavaty/temp/20180622 auto test";
String tblFnm="summary_test09_.txt";
String tblPth="X:\\group\\ALMFstuff\\Aliaksandr\\Crocker-fly-feedback\\20181";
String tblFnm="summary_test01_.txt";
Job_SelectMultipleEmbryosAutoRotation testJob=new Job_SelectMultipleEmbryosAutoRotation();
testJob.initialise(null, "LZ.Image", false);
testJob.testJobMicTable(0, tblPth, tblFnm);
......
......@@ -7,7 +7,7 @@ import ij.plugin.PlugIn;
import automic.online.jobs.TestJobGui;
import automic.utils.Utils;
import feedback.fly.embryo.jobs.Job_SelectMultipleEmbryosAuto;
import feedback.fly.embryo.jobs.Job_SelectMultipleEmbryosAutoRotation;
......@@ -23,7 +23,7 @@ public class Embryo_Selection_Tester implements PlugIn {
// }
try{
TestJobGui jobTester=new TestJobGui(Job_SelectMultipleEmbryosAuto.class, "LZ.Image");
TestJobGui jobTester=new TestJobGui(Job_SelectMultipleEmbryosAutoRotation.class, "LZ.Image");
jobTester.initialiseGui();
jobTester.runTest();
}catch (Exception e){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment