Re: Problems running Versatile Wand in batch mode
Posted by
Michael Schmid on
May 19, 2015; 3:25pm
URL: http://imagej.273.s1.nabble.com/Problems-running-Versatile-Wand-in-batch-mode-tp5012873p5012876.html
Hi Avital,
sorry, I can't reproduce the problem. Your macro works; it blurs the first image and does the wand selection on it. I also get the selection in the ROI Manager.
I tried with both 8-bit grayscale as well as RGB images.
What I don't understand is the "makePoint(1854, 726)" command; Gaussian Blur does not care about point selections. So it blurs the whole image.
I am using ImageJ 1.49u4, Java 1.6.0_45.
Michael
________________________________________________________________
On May 19, 2015, at 17:01, Avital Steinberg wrote:
> 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