Re: Different results from setBatchMode
Posted by
Janne Hyötylä on
Oct 22, 2010; 2:56pm
URL: http://imagej.273.s1.nabble.com/Different-results-from-setBatchMode-tp3686595p3686597.html
Hi all,
On Thu, 21 Oct 2010 14:43:54 +0200, Ben Tupper <
[hidden email]>
wrote:
> Hi,
>
> Sometimes, when running in batchmode, it seemes that ImageJ can get
> ahead of itself. One thing you might try to resolve this is to capture
> the ID of each image as created and then explicitly select that image
> before operating upon it. In the past, that has resolved these kinds of
> issue for me. For example...
>
> run("Red");
> redID = getImageID();
> selectImage(redID);
> setMinAndMax(100,200);
>
>
> There may be other issues here, but I think it is worth trying to
> control the active image using getImageID and selectImage.
Do other people have experience or opinions about this?
So far I didn't actually think of selecting the desired image, but relied
on the principle that if in "manual mode" (i.e. by going through the
menus) the correct image is automatically selected after an operation, it
will also be in a macro with setBatchMode(true). Maybe that's a wrong
assumption...?
Cheers,
Janne