Login  Register

Summarize table not writing in macro

Posted by schamber789 on Sep 21, 2013; 2:04am
URL: http://imagej.273.s1.nabble.com/Summarize-table-not-writing-in-macro-tp5004888.html

Hello all,

I have this macro below that works fine on a single image, but doesn't work
in batch mode. I want to use the macro to process a single folder at a time
of images with .zvi extension.  I'd appreciate any guidance on where to
look for the problem!

Thanks!
Scott Chamberlain
Simon Fraser University

macro "countem [q]" {
   title = getTitle;
   input = "/path1/";
   output = "/path2/";

    function doit(input, output, title) {
       run("ZVI Reader", "open="+intput+title)
       run("Subtract Background...", "rolling=100");
       run("Invert");
       setAutoThreshold("Yen");
       run("Convert to Mask");
       run("Watershed");
       run("Set Measurements...", "slice area count mean circularity
redirect=None");
       run("Analyze Particles...", "size=40-120 circularity=0.50-1.00
show=summarize");
       saveAs("text", output+title+".txt");
       close();
     }

   setBatchMode(true);
   list = getFileList(input);
   for (i = 0; i < list.length; i++)
        doit(input, output, list[i]);
   setBatchMode(false);
}

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html