|
Hi everyone,
I am trying to batch process outlines from JPGs in a folder. I am using the Path Writer plugin because, unlike the SaveXYCoordinates, it saves every single pixel, which is what I need. The following macro seems to run correctly, but it saves nothing. If I take the save command out, it prompts me for a 'save' click at each image, which is painful as I have 5000 images – but the results are good. I've searched around but cannot find the correct syntax that will force it to just save the text files without asking. I know this should be easy, but cannot find the answer. Any help would be greatly appreciated.
I am using Fiji on Mac OS X 10.6 and am not familiar with the macro language. Below is the code with the problem spot in boldface.
function action (input, output, filename) {
open(input + filename);
run("Make Binary");
run("Outline");
run("Flip Vertically");
//setTool("wand");
run("Wand Tool...", "mode=Legacy tolerance=90");
doWand(1944, 1296);
run("Path Writer", "save=["output + filename"]");
close();
}
input="/Volumes/OrangeFotoVideo/Pictures/Scientific Photos/.../";
output="/Volumes/OrangeFotoVideo/Pictures/Scientific Photos/.../";
setBatchMode(true);
list = getFileList(input);
for (i = 0; i < list.length; i++)
action(input, output, list[i]);
setBatchMode(false);
Thanks!
|