Commit 0ed6ba77 authored by Aliaksandr Halavatyi's avatar Aliaksandr Halavatyi
Browse files

remove rotation reference from autoselection job

parent 7cba4d6a
......@@ -24,7 +24,6 @@ import ij.plugin.filter.ParticleAnalyzer;
import ij.plugin.filter.RankFilters;
import ij.plugin.frame.RoiManager;
import ij.process.ImageProcessor;
import ij.process.ImageStatistics;
import loci.plugins.BF;
import loci.plugins.in.ImporterOptions;
......@@ -66,7 +65,6 @@ public class Job_SelectMultipleEmbryosAutoRotation extends Job_Default{
private Roi wellRoi;
private Roi[] embryoRois;
private Roi[] selectedEmbryoRois;
private Double[] rotations;
//private boolean selectionMade=false;
......@@ -103,7 +101,6 @@ public class Job_SelectMultipleEmbryosAutoRotation extends Job_Default{
protected void cleanIterOutput(){
img=null;
selectedPoints=null;
rotations=null;
wellRoi=null;
embryoRois=null;
selectedEmbryoRois=null;
......@@ -166,14 +163,11 @@ public class Job_SelectMultipleEmbryosAutoRotation extends Job_Default{
double x,y;
selectedPoints=new Point2D.Double[selectedEmbryoRois.length];
rotations=new Double[selectedEmbryoRois.length];
for (int i=0;i<selectedEmbryoRois.length;i++){
x=selectedEmbryoRois[i].getContourCentroid()[0];
y=selectedEmbryoRois[i].getContourCentroid()[1];
selectedPoints[i]=new Point2D.Double(x, y);
img.setRoi(selectedEmbryoRois[i]);
ImageStatistics stat=img.getStatistics(ImageStatistics.ELLIPSE);
rotations[i]=stat.angle;
}
......@@ -282,7 +276,7 @@ public class Job_SelectMultipleEmbryosAutoRotation extends Job_Default{
//PointRoi saveRoi=null;
//form comma-separated strings with coordinates
String xstr="", ystr="",zstr="",rotstr="";
String xstr="", ystr="",zstr="";
// submit 3d points in future
for (int i=0;i<selectedEmbryoRois.length;i++){
......@@ -290,16 +284,14 @@ public class Job_SelectMultipleEmbryosAutoRotation extends Job_Default{
xstr+=";";
ystr+=";";
zstr+=";";
rotstr+=";";
}
xstr+=selectedPoints[i].x;
ystr+=selectedPoints[i].y;
zstr+="0";
rotstr+=rotations[i];
zstr+=img.getNSlices()/2; //central slice by default
}
ZeissKeys.submitCommandsToMicroscope("trigger1", xstr,ystr,zstr,rotstr,"","","","","");
ZeissKeys.submitCommandsToMicroscope("trigger1", xstr,ystr,zstr,"","","","","","");
saveRoisForImage(newImgFile, getOverlay().toArray());
//saveRoiForImage(newImgFile,saveRoi);
......@@ -307,7 +299,6 @@ public class Job_SelectMultipleEmbryosAutoRotation extends Job_Default{
this.setSharedValue("Zoom Points", selectedPoints);
this.setSharedValue("Zoom Counter", -1);
this.setSharedValue("Selected Embryo Rois", selectedEmbryoRois);
this.setSharedValue("Rotations", rotations);
}
@Override
......
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