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