Posted by
Avital Steinberg on
May 19, 2015; 3:01pm
URL: http://imagej.273.s1.nabble.com/Problems-running-Versatile-Wand-in-batch-mode-tp5012873.html
Hi,
I'm trying to use Versatile Wand in batch mode. The following macro works
well in batch mode:
setBatchMode(true);
open();
makePoint(1854, 726);
run("Gaussian Blur...", "sigma=2");
run("Set Scale...", "distance=0");
run("Versatile Wand", "value=60 color=-100 gradient=10
connectedness=8-connected x=2 y=2 do");
run("ROI Manager...");
roiManager("Add");
saveAs("Tiff");
However - when I try to work with multiple images, select the active image
and then use the Versatile Wand, no selection is created:
setBatchMode(true);
open();
image1ID = getImageID();
open();
image2ID = getImageID();
selectImage(image1ID);
if(isActive(image1ID)){
print("The first image is active");
}
else {
print("The first image isn't active");
}
if(isActive(image2ID)){
print("The second image is active");
}
else {
print("The second image isn't active");
}
makePoint(1854, 726);
run("Gaussian Blur...", "sigma=2");
run("Set Scale...", "distance=0");
run("Versatile Wand", "value=60 color=-100 gradient=10
connectedness=8-connected x=2 y=2 do");
run("ROI Manager...");
roiManager("Add");
saveAs("Tiff");
Why wouldn't this script work? Only one image is active.
Thank you,
Avital
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html