Hi all,
Quick question on APPENDING the results window when running BoneJ plugin in batch mode… I have 500 images that have been skeletonized, and would like run the ‘analyse skeleton’ function in the BoneJ plugin and save the results for all in one file with the name of the image… NOTE: unlike other functions in imageJ, this one clears the results window after each image. Three years ago I thought I figured this out, as I have a macro that ran this that apparently worked:
dir1 = getDirectory("Choose Source Directory ");
list = getFileList(dir1);
setBatchMode(true);
for (i=0; i<list.length; i++) {
showProgress(i+1, list.length);
open(dir1+list[i]);
title = getTitle();
run("Clear Results");
run("Analyse Skeleton", "prune=none");
run("Summarize");
print(title,nResults,getResult("# Branches",nResults-4),getResult("# Junctions",nResults-4),getResult("Average Branch Length",nResults-4),getResult("Maximum Branch Length",nResults-4));
close();
}
I am re-running some research I’ve done before, and I have the results file from there, so that’s why I thought this worked at one time, but this code gives me an error message on the second image.
Can someone please point out where I’m going wrong? (I know it’s in the ‘print…’ line, just not formatted correctly, I’m assuming… and I can’t spend hours on this one macro
Much appreciated!