Commit 75abc10c authored by Aliaksandr Halavatyi's avatar Aliaksandr Halavatyi

removing obsolete JobDistributors

parent cbc0fa11
package feedback.fly.embryo.jobdistributors;
//import ij.Prefs;
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.online.jobs.common.Job_RecordFinish;
import automic.parameters.ParameterCollection;
import automic.parameters.gui.ParameterGuiManager;
import automic.table.TableModel;
import automic.table.TableProcessor;
import feedback.fly.embryo.jobs.Job_FocusEmbryoAuto;
import feedback.fly.embryo.jobs.Job_SelectMultipleEmbryosAuto;
public class JobDistributor_AutoSelectionMultiple_AFocus extends JobDistributor_Abstract implements PlugIn {
//private static final String PREFS_PREFIX="feebback.fly.embryo";
//private ParameterCollection manualTrackParameterCollectionSelect;
//private ParameterCollection manualTrackParameterCollectionFocus;
@Override
protected void fillJobList(){
//Job_SelectRecordManual manualTrackJob=new Job_SelectRecordManual();
//manualTrackJob.parseInputParameterValues(manualTrackParameterCollection);
//manualTrackJob.setZInvert(invertZ);
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_SelectMultipleEmbryosAuto job2=new Job_SelectMultipleEmbryosAuto();
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_FocusEmbryoAuto job3=new Job_FocusEmbryoAuto();
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_RecordFinish.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("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){
//manualTrackParameterCollectionSelect=new Job_SelectMultipleEmbryosAutoInit().createJobParameters();
//manualTrackParameterCollectionFocus=new Job_FocusEmbryoAuto().createJobParameters();
//_dialog.addCheckbox(Job_SelectEmbryoManual.KEY_INVERT_Z, Prefs.getBoolean(generatePrefsKey(Job_SelectEmbryoManual.KEY_INVERT_Z),false));
//_dialog.addNumericField(Job_SelectEmbryoManual.KEY_LOCATION_X, Prefs.getInt(generatePrefsKey(Job_SelectEmbryoManual.KEY_LOCATION_X),1000), 0);
//_dialog.addNumericField(Job_SelectEmbryoManual.KEY_LOCATION_Y, Prefs.getInt(generatePrefsKey(Job_SelectEmbryoManual.KEY_LOCATION_Y),120), 0);
//_dialog.addNumericField(Job_SelectEmbryoManual.KEY_ZOOM_ITERATIONS, Prefs.getInt(generatePrefsKey(Job_SelectEmbryoManual.KEY_ZOOM_ITERATIONS),2), 0);
}
@Override
protected void getProtocolPreferencesFromDialog(GenericDialog _dialog){
//manualTrackParameterCollectionSelect.setUndefinedValuesFromDefaults();
//manualTrackParameterCollectionFocus.setUndefinedValuesFromDefaults();
// boolean invertZ=_dialog.getNextBoolean();
// manualTrackParameterCollection.setParameterValue(Job_SelectEmbryoManual.KEY_INVERT_Z, invertZ);
// Prefs.set(generatePrefsKey(Job_SelectEmbryoManual.KEY_INVERT_Z), invertZ);
//
// int locationX=(int)_dialog.getNextNumber();
// manualTrackParameterCollection.setParameterValue(Job_SelectEmbryoManual.KEY_LOCATION_X, locationX);
// Prefs.set(generatePrefsKey(Job_SelectEmbryoManual.KEY_LOCATION_X), invertZ);
//
// int locationY=(int)_dialog.getNextNumber();
// manualTrackParameterCollection.setParameterValue(Job_SelectEmbryoManual.KEY_LOCATION_Y, locationY);
// Prefs.set(generatePrefsKey(Job_SelectEmbryoManual.KEY_LOCATION_Y), invertZ);
//
// int zoomIterations=(int)_dialog.getNextNumber();
// manualTrackParameterCollection.setParameterValue(Job_SelectEmbryoManual.KEY_ZOOM_ITERATIONS, zoomIterations);
// Prefs.set(generatePrefsKey(Job_SelectEmbryoManual.KEY_ZOOM_ITERATIONS), invertZ);
}
@Override
protected boolean showDialogInDebugRun(){
return false;
}
@Override
protected void setDebugConfiguration(){
final String searchPath="C:/tempDat/AutoFRAP_test";
this.setGeneralOptions(searchPath, true, false);
this.fileExtension="czi";
//manualTrackParameterCollectionSelect=new Job_SelectMultipleEmbryosAutoInit().createJobParameters();
//manualTrackParameterCollectionSelect.setUndefinedValuesFromDefaults();
//manualTrackParameterCollectionFocus=new Job_SelectMultipleEmbryosAutoInit().createJobParameters();
//manualTrackParameterCollectionFocus.setUndefinedValuesFromDefaults();
}
// private String generatePrefsKey(String _key){
// return String.format("%s.%s",PREFS_PREFIX, _key);
// }
}
package feedback.fly.embryo.jobdistributors;
//import ij.Prefs;
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.online.jobs.common.Job_RecordFinish;
import automic.parameters.ParameterCollection;
import automic.parameters.gui.ParameterGuiManager;
import automic.table.TableModel;
import automic.table.TableProcessor;
import feedback.fly.embryo.jobs.Job_FocusEmbryoAutoRotation;
import feedback.fly.embryo.jobs.Job_SelectMultipleEmbryosAutoRotation;
public class JobDistributor_AutoSelectionMultiple_AFocus_Rotation extends JobDistributor_Abstract implements PlugIn {
//private static final String PREFS_PREFIX="feebback.fly.embryo";
//private ParameterCollection manualTrackParameterCollectionSelect;
//private ParameterCollection manualTrackParameterCollectionFocus;
@Override
protected void fillJobList(){
//Job_SelectRecordManual manualTrackJob=new Job_SelectRecordManual();
//manualTrackJob.parseInputParameterValues(manualTrackParameterCollection);
//manualTrackJob.setZInvert(invertZ);
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_FocusEmbryoAutoRotation job3=new Job_FocusEmbryoAutoRotation();
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_RecordFinish.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("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){
//manualTrackParameterCollectionSelect=new Job_SelectMultipleEmbryosAutoInit().createJobParameters();
//manualTrackParameterCollectionFocus=new Job_FocusEmbryoAuto().createJobParameters();
//_dialog.addCheckbox(Job_SelectEmbryoManual.KEY_INVERT_Z, Prefs.getBoolean(generatePrefsKey(Job_SelectEmbryoManual.KEY_INVERT_Z),false));
//_dialog.addNumericField(Job_SelectEmbryoManual.KEY_LOCATION_X, Prefs.getInt(generatePrefsKey(Job_SelectEmbryoManual.KEY_LOCATION_X),1000), 0);
//_dialog.addNumericField(Job_SelectEmbryoManual.KEY_LOCATION_Y, Prefs.getInt(generatePrefsKey(Job_SelectEmbryoManual.KEY_LOCATION_Y),120), 0);
//_dialog.addNumericField(Job_SelectEmbryoManual.KEY_ZOOM_ITERATIONS, Prefs.getInt(generatePrefsKey(Job_SelectEmbryoManual.KEY_ZOOM_ITERATIONS),2), 0);
}
@Override
protected void getProtocolPreferencesFromDialog(GenericDialog _dialog){
//manualTrackParameterCollectionSelect.setUndefinedValuesFromDefaults();
//manualTrackParameterCollectionFocus.setUndefinedValuesFromDefaults();
// boolean invertZ=_dialog.getNextBoolean();
// manualTrackParameterCollection.setParameterValue(Job_SelectEmbryoManual.KEY_INVERT_Z, invertZ);
// Prefs.set(generatePrefsKey(Job_SelectEmbryoManual.KEY_INVERT_Z), invertZ);
//
// int locationX=(int)_dialog.getNextNumber();
// manualTrackParameterCollection.setParameterValue(Job_SelectEmbryoManual.KEY_LOCATION_X, locationX);
// Prefs.set(generatePrefsKey(Job_SelectEmbryoManual.KEY_LOCATION_X), invertZ);
//
// int locationY=(int)_dialog.getNextNumber();
// manualTrackParameterCollection.setParameterValue(Job_SelectEmbryoManual.KEY_LOCATION_Y, locationY);
// Prefs.set(generatePrefsKey(Job_SelectEmbryoManual.KEY_LOCATION_Y), invertZ);
//
// int zoomIterations=(int)_dialog.getNextNumber();
// manualTrackParameterCollection.setParameterValue(Job_SelectEmbryoManual.KEY_ZOOM_ITERATIONS, zoomIterations);
// Prefs.set(generatePrefsKey(Job_SelectEmbryoManual.KEY_ZOOM_ITERATIONS), invertZ);
}
@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";
//manualTrackParameterCollectionSelect=new Job_SelectMultipleEmbryosAutoInit().createJobParameters();
//manualTrackParameterCollectionSelect.setUndefinedValuesFromDefaults();
//manualTrackParameterCollectionFocus=new Job_SelectMultipleEmbryosAutoInit().createJobParameters();
//manualTrackParameterCollectionFocus.setUndefinedValuesFromDefaults();
}
// private String generatePrefsKey(String _key){
// return String.format("%s.%s",PREFS_PREFIX, _key);
// }
}
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_FocusEmbryoAutoDataset;
import feedback.fly.embryo.jobs.Job_RecordFinishDataset;
import feedback.fly.embryo.jobs.Job_SelectMultipleEmbryosManual3D;
public class JobDistributor_ManualSelection3DMultiple_AFocus_Rotation 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_SelectMultipleEmbryosManual3D job2=new Job_SelectMultipleEmbryosManual3D();
ParameterCollection job2Parameters=job2.createJobParameters();
job2Parameters.setUndefinedValuesFromDefaults();
ParameterGuiManager pgManager2=new ParameterGuiManager(job2Parameters);
try{
pgManager2.refineParametersViaDialog("Parameters for manual embryo selection");
}catch(Exception _ex){
new WaitForUserDialog("error in parameter values");
}
job2.parseInputParameterValues(pgManager2.getParameterCollection());
super.addImageJob(job2, "DE_2_", "LZ.Image", true);
Job_FocusEmbryoAutoDataset job3=new Job_FocusEmbryoAutoDataset();
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("Focus.Z", "NUM");
outTbl.addValueColumn("Rotation", "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";
}
}
package jobdistributors.run.debug;
import feedback.fly.embryo.jobdistributors.JobDistributor_AutoSelectionMultiple_AFocus;
import ij.IJ;
import ij.ImageJ;
public class RunAutoDistributor {
public static void main(String[] args) {
Class<?> clazz = JobDistributor_AutoSelectionMultiple_AFocus.class;
// start ImageJ
new ImageJ();
//IJ.runPlugIn(clazz.getName(),"Debug run");
IJ.runPlugIn(clazz.getName(),"");
}
}
package jobdistributors.run.debug;
import feedback.fly.embryo.jobdistributors.JobDistributor_AutoSelectionMultiple_AFocus_Rotation;
import ij.IJ;
import ij.ImageJ;
public class RunAutoDistributorRotation {
public static void main(String[] args) {
Class<?> clazz = JobDistributor_AutoSelectionMultiple_AFocus_Rotation.class;
// start ImageJ
new ImageJ();
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