Commit 750f6da2 authored by Aliaksandr Halavatyi's avatar Aliaksandr Halavatyi

protocol with autoselection fucusing rotation and split

parent a4020a78
package feedback.fly.embryo.jobdistributors;
import ij.gui.GenericDialog;
import ij.gui.WaitForUserDialog;
import ij.plugin.PlugIn;
import automic.online.jobdistributors.JobDistributor_Abstract;
import automic.online.jobs.common.Job_AutofocusInitOffset;
import automic.parameters.ParameterCollection;
import automic.parameters.gui.ParameterGuiManager;
import automic.table.TableModel;
import automic.table.TableProcessor;
import feedback.fly.embryo.jobs.Job_FocusEmbryoAutoDatasetSplit;
import feedback.fly.embryo.jobs.Job_RecordFinishDataset;
import feedback.fly.embryo.jobs.Job_SelectMultipleEmbryosAutoRotation;
public class JobDistributor_AutoSelectionMultiple_AFocus_Rotation_Split extends JobDistributor_Abstract implements PlugIn {
@Override
protected void fillJobList(){
Job_AutofocusInitOffset job1=new Job_AutofocusInitOffset();
ParameterCollection job1Parameters=job1.createJobParameters();
job1Parameters.setUndefinedValuesFromDefaults();
ParameterGuiManager pgManager1=new ParameterGuiManager(job1Parameters);
try{
pgManager1.refineParametersViaDialog("Coverslip focusing");
}catch(Exception _ex){
new WaitForUserDialog("error in parameter values");
}
job1.parseInputParameterValues(pgManager1.getParameterCollection());
super.addImageJob(job1, "DE_1_", "AFocus", true);
Job_SelectMultipleEmbryosAutoRotation job2=new Job_SelectMultipleEmbryosAutoRotation();
ParameterCollection job2Parameters=job2.createJobParameters();
job2Parameters.setUndefinedValuesFromDefaults();
ParameterGuiManager pgManager2=new ParameterGuiManager(job2Parameters);
try{
pgManager2.refineParametersViaDialog("Parameters for embryo selection");
}catch(Exception _ex){
new WaitForUserDialog("error in parameter values");
}
job2.parseInputParameterValues(pgManager2.getParameterCollection());
super.addImageJob(job2, "DE_2_", "LZ.Image", true);
Job_FocusEmbryoAutoDatasetSplit job3=new Job_FocusEmbryoAutoDatasetSplit();
ParameterCollection job3Parameters=job3.createJobParameters();
job3Parameters.setUndefinedValuesFromDefaults();
ParameterGuiManager pgManager3=new ParameterGuiManager(job3Parameters);
try{
pgManager3.refineParametersViaDialog("Parameters for embryo focusing");
}catch(Exception _ex){
new WaitForUserDialog("error in parameter values");
}
job3.parseInputParameterValues(pgManager3.getParameterCollection());
super.addImageJob(job3, "TR1_1_", "Focus.Image", true);
super.addImageJob(Job_RecordFinishDataset.class, "TR2_1_", "Result.Image", true);
}
@Override
protected TableModel constructTabModel(String _rpth){
TableModel outTbl=new TableModel(_rpth);
outTbl.addColumn("Date.Time");
outTbl.addFileColumns("AFocus", "IMG");
outTbl.addFileColumns("LZ.Image", "IMG");
outTbl.addFileColumns("Focus.Image", "IMG");
outTbl.addFileColumns("Result.Image", "IMG");
outTbl.addValueColumn("Zoom.X", "NUM");
outTbl.addValueColumn("Zoom.Y", "NUM");
outTbl.addValueColumn("Correction.X", "NUM");
outTbl.addValueColumn("Correction.Y", "NUM");
outTbl.addValueColumn("Rotation", "NUM");
outTbl.addValueColumn("Focus.Z", "NUM");
outTbl.addValueColumn("Success", "BOOL");
outTbl.addRow(new Object[outTbl.getColumnCount()]);
return outTbl;
}
@Override
protected TableProcessor configureTableProcessor(TableModel _tModel)throws Exception{
TableProcessor tProcessor=new TableProcessor(_tModel);
tProcessor.addFileColumns("Selected.Embryo.LZ", "ROI");
return tProcessor;
}
@Override
protected void putProtocolPreferencesToDialog(GenericDialog _dialog){
}
@Override
protected void getProtocolPreferencesFromDialog(GenericDialog _dialog){
}
@Override
protected boolean showDialogInDebugRun(){
return false;
}
@Override
protected void setDebugConfiguration(){
final String searchPath="C:/tempDat/AutoMic_test";
this.setGeneralOptions(searchPath, true, false);
this.fileExtension="lsm";
}
}
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