[ImageJ-bugs] [Bug 1171] batch mode not working
bugzilla at fiji.sc
bugzilla at fiji.sc
Tue Oct 6 17:14:22 CDT 2015
http://fiji.sc/bugzilla/show_bug.cgi?id=1171
Wayne Rasband <wsr at nih.gov> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDSINFO |RESOLVED
Resolution|--- |FIXED
--- Comment #7 from Wayne Rasband <wsr at nih.gov> ---
Here 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 receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-bugs/attachments/20151006/1169d83d/attachment.html>
More information about the Imagej-bugs
mailing list