Commit 4c3acdb9 authored by Aliaksandr Halavatyi's avatar Aliaksandr Halavatyi
Browse files

resolve an issue when the well is the whole image

parent f76a3e39
......@@ -215,9 +215,14 @@ public class Job_SelectMultipleEmbryosAuto extends Job_Default{
this.showDebug(_embryoImage, "Image for embryo segmentation", true);
//exclude particles outside ROI by filling with 0
embryoProcessor.setColor(0);
embryoProcessor.fillOutside(wellRoi);
long imageSize=embryoProcessor.getWidth()*embryoProcessor.getHeight();
embryoProcessor.setRoi(wellRoi);
long roiSize=(long)embryoProcessor.getStats().area;
embryoProcessor.setRoi((Roi)null);
if(roiSize<imageSize) {//check if there is any area on the image outside Roi
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);
......@@ -309,7 +314,12 @@ public class Job_SelectMultipleEmbryosAuto extends Job_Default{
//saveRoiForImage(newImgFile,saveRoi);
this.setSharedValue("Zoom Points", selectedPoints);
this.setSharedValue("Zoom Counter", -1);
if(this.getSharedValue("Zoom Counter")==null) {
this.setSharedValue("Zoom Counter", -1);
}
if(this.getSharedValue("Table Row Counter")==null) {
this.setSharedValue("Table Row Counter", -1);
}
this.setSharedValue("Selected Embryo Rois", selectedEmbryoRois);
}
......
......@@ -177,8 +177,12 @@ public class Job_SelectMultipleEmbryosManual3D extends Job_Default{
saveRoiForImage(newImgFile,saveRoi);
this.setSharedValue("Zoom Counter", -1);
this.setSharedValue("Table Row Counter", -1);
if(this.getSharedValue("Zoom Counter")==null) {
this.setSharedValue("Zoom Counter", -1);
}
if(this.getSharedValue("Table Row Counter")==null) {
this.setSharedValue("Table Row Counter", -1);
}
}
......
package jobdistributors.run.debug;
import feedback.fly.embryo.jobdistributors.JobDistributor_AutoSelectionMultiple_AFocus_Rotation_Split;
//import feedback.fly.embryo.jobdistributors.JobDistributor_ManualSelection3DMultiple_AFocus_Rotation_Split;
import ij.IJ;
import net.imagej.ImageJ;
public class RunJobDistributor {
public static void main(String[] args) {
//Class<?> clazz = JobDistributor_ManualSelection3DMultiple_AFocus_Rotation_Split.class;
Class<?> clazz = JobDistributor_AutoSelectionMultiple_AFocus_Rotation_Split.class;
// start ImageJ
ImageJ ij2=new ImageJ();
ij2.ui().showUI();
//IJ.runPlugIn(clazz.getName(),"Debug run");
IJ.runPlugIn(clazz.getName(),"");
}
}
package jobdistributors.run.debug;
import feedback.fly.embryo.jobdistributors.JobDistributor_ManualSelection3DMultiple_AFocus_Rotation_Split;
import ij.IJ;
import net.imagej.ImageJ;
public class RunManualDistributorRotationSplit {
public static void main(String[] args) {
Class<?> clazz = JobDistributor_ManualSelection3DMultiple_AFocus_Rotation_Split.class;
// start ImageJ
ImageJ ij2=new ImageJ();
ij2.ui().showUI();
IJ.runPlugIn(clazz.getName(),"Debug run");
//IJ.runPlugIn(clazz.getName(),"");
}
}
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