Commit b64562f7 authored by Aliaksandr Halavatyi's avatar Aliaksandr Halavatyi
Browse files

initialising correctly microscopeCommander

parent e90d82f5
......@@ -8,7 +8,7 @@
<version>5.0</version> <relativePath /> </parent> -->
<groupId>embl.almf</groupId>
<artifactId>AutoMicTools_</artifactId>
<version>1.1.31-SNAPSHOT</version>
<version>1.1.32-SNAPSHOT</version>
<name>plugins/AutoMicTools_.jar</name>
<description>Collection of tools for automated (feedback) microscopy data acquisition and analysis</description>
......
......@@ -205,14 +205,13 @@ public abstract class JobDistributor_Abstract extends RunJythonOnMonitoredFiles
distributorParameters=createDistributorParameters();
microscopeCommander = MicroscopeCommanderFactory.createMicroscopeCommander(microscopeCommanderMap.get(distributorParameters.getParameterStringValue(KEY_MICROSCOPE_COMMANDER)),null);
try{
ParameterPrefsManager.setParametersFromFijiPrefs(distributorParameters, PREFS_PREFIX);
}catch (Exception _ex){
throw new RuntimeException("Can not read parameters from Prefs");
}
JobList=new ArrayList<Job_Default>();
SharedData=new HashMap<String, Object>();
......@@ -229,7 +228,9 @@ public abstract class JobDistributor_Abstract extends RunJythonOnMonitoredFiles
public void addImageJob(Class<?> _JobClass,String _fileTag,String _colTag,boolean _visual)/*throws Exception*/{
if (microscopeCommander==null)
microscopeCommander = MicroscopeCommanderFactory.createMicroscopeCommander(microscopeCommanderMap.get(distributorParameters.getParameterStringValue(KEY_MICROSCOPE_COMMANDER)),null);
Job_Default job;
if ((_JobClass==null)||(!Job_Default.class.isAssignableFrom(_JobClass)))
......@@ -266,7 +267,11 @@ public abstract class JobDistributor_Abstract extends RunJythonOnMonitoredFiles
}
public void addImageJob(Job_Default _job,String _fileTag,String _colTag,boolean _visual)/*throws Exception*/{
_job.initialise(_fileTag, _colTag, _visual);
if (microscopeCommander==null)
microscopeCommander = MicroscopeCommanderFactory.createMicroscopeCommander(microscopeCommanderMap.get(distributorParameters.getParameterStringValue(KEY_MICROSCOPE_COMMANDER)),null);
_job.initialise(_fileTag, _colTag, _visual,microscopeCommander);
JobList.add(_job);
}
......@@ -328,8 +333,8 @@ public abstract class JobDistributor_Abstract extends RunJythonOnMonitoredFiles
public void startFolderMonitoring() throws Exception {
//microscopeCommander = MicroscopeCommanderFactory.createMicroscopeCommander(MicroscopeCommanderFactory.ZEISS_ZEN_BLACK,null);
IJ.log("Created microscope commander: "+ microscopeCommander);
IJ.log("Created microscope commander: "+ microscopeCommander);
......
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