Login  Register

saving multiple result tables in macro

Posted by giorgionabble on Jun 21, 2013; 3:50pm
URL: http://imagej.273.s1.nabble.com/saving-multiple-result-tables-in-macro-tp5003561.html

I'm using the Analyze skeleton function to batch process all the image in a directory and save the results with the names of theimage I process.
The only problem is that it only saves one table results :(
There's the script I've made copying and cutting examples I've found in  the mailing list

  macro "Batch Analyse" {
     dir = getDirectory("Choose a Directory ");
     list = getFileList(dir);
     setBatchMode(true);
     for (i=0; i<list.length; i++) {
        path = dir+list[i];
        open(path);
        run("Make Binary");
        run("Skeletonize (2D/3D)");
        run("Analyze Skeleton (2D/3D)", "prune=none calculate show");
        path2 = dir+File.nameWithoutExtension;
        selectWindow("Longest shortest paths");
        saveAs("Results", path2+"-Results.xls");
        saveAs("Results", path2+"-Branch information.xls");
     }

Thanks in advance for any help !!!
Giorgio