|
Bugzilla – Bug 1171 |
batch mode not working |
Last modified: 2015-10-07 20:55:08 CDT |
| ⚠ |
NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug. The Fiji project now uses GitHub Issues for issue tracking. Please file all new issues there. |
|
|
|
||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||
Created attachment 264 macro generating the issue with proof of itCreated attachment 265 runnable macroCreated attachment 266 offending image stack if you run the macro on the folder containing this image stack you can reproduce the issueHere is a version of your macro that should work better. I marked the changes with "//**". dir = getDirectory("Choose Sorce Directory"); //with slash at the end dir2 = getDirectory("Choose Destination Directory"); acq = getFileList(dir); setBatchMode(true); for (i=0; i<acq.length; i++) { if (endsWith(acq[i], "tif")) { open(dir+acq[i]); run("Make Composite"); run("Split Channels"); close("C3-"+acq[i]); imageCalculator("Subtract stack", "C2-"+acq[i], "C1-"+acq[i]); //Save Z-projection of 169 selectWindow("C2-"+acq[i]); run("Despeckle", "stack"); //** run("Z Project...", "projection=[Average Intensity]"); selectWindow("AVG_C2-"+acq[i]); path = dir2+"Zproj-169-BGsubtr-"+acq[i]; //** run("Save", "save=&path"); //** close("AVG_C2-"+acq[i]); //Save Z-projection of SHG selectWindow("C4-"+acq[i]); run("Despeckle", "stack"); //** run("Z Project...", "projection=[Average Intensity]"); selectWindow("AVG_C4-"+acq[i]); path = dir2+"Zproj-SHG-BGsubtr-"+acq[i]; //** run("Save", "save=&path"); //** close("*"); } }You are probably using stacks for the first time. "run('Despeckle')" displays a dialog if the active image is a stack. "run('Despeckle','stack')" never displays a dialog.