BatchMode problem
Posted by Du, Guanghua on Jan 28, 2009; 3:55pm
URL: http://imagej.273.s1.nabble.com/Trouble-with-writing-a-macro-setThreshold-tp3693903p3693906.html
Dear ImageJ users,
I am tring to draw strings in the slices. Everything works fine in the
normal mode, but when I switch to batch mode, then only in one slice the
text string is drawn, namely the first slice, and all the other
slices in the image stack is empty.
here is the detail, I create a stack ObjVilFileName; in a seperate
image: objectImageTitle, I write the strings; then I copy this image and
paste it to the stack;
when the setBatchMode command is deleted, everything works, but not with
it.
// setBatchMode(true);
selectWindow(objectImageTitle);
drawString(filename, 10,20);
drawString("Obj: "+objectNumber, 10, 40);
updateDisplay();
run("Copy");
selectWindow(ObjVisFileName);
Stack.setSlice(i+1);
run("Paste");
updateDisplay();
Thanks a lot!! and a late Happy New Year!
Guanghua Du
TUM, Physik Dept.
Germany