Hi,
I'm new to ImageJ (and mailing lists). I've run into a bit of a bug I
think. I'm trying to do maxima finding on a bunch of images and have
written a macro to do so on a selected directory. I've also got some print
statements, mostly just sanity checks to make sure that it's running
properly. If I have them included, then sometimes when I try to write the
Results to a file, it actually writes the log window. Sometimes it works
properly though. If I get rid of them, then it seems to work fine.
Here's the macro (the commented print is the troublemaker):
prefix = "Points_";
wext = ".csv";
rext = ".pgm";
dir = getDirectory("Choose Source Directory ");
list = getFileList(dir)
setBatchMode(true)
for (i=0; i<list.length; i++) {
showProgress(i+1, list.length);
name = list[i];
pos = indexOf(name,'.');
ext = substring(name,pos);
if (ext ==rext) {
open(dir + list[i]);
nameWE = substring(name,0,pos);
newName = prefix + nameWE + wext;
run("Find Maxima...", "noise=70 output=List");
saveAs("Results", dir+newName);
//print("Processed:" +name);
}
}
print("Finished");
Any thoughts?
-Jared
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html