Login  Register

Re: batch mode

Posted by Rasband, Wayne (NIH/NIMH) [E] on Mar 12, 2011; 3:45am
URL: http://imagej.273.s1.nabble.com/batch-mode-tp3685405p3685406.html

On Mar 7, 2011, at 8:13 AM, Frank Sprenger wrote:

> Hello,
> I have several problems with Macros that run in BatchMode(false), but not in BatchMode(true). I have seen several postings about that issue already but I am not sure what the problem is in my case.
>
> I am running 1.45b in 64bit mode.
>
> Here is one example of a macro running only in BathMode(false). When running in BatchMode(true), I am only getting black images for ch2 and ch3. The original image is a 32bit (sum-projection) hyperstack with three channels and 30 frames.
> Is there a problem with 32bit images???

The bugs that caused these problems are fixed in the 1.45d1 daily build. You can upgrade by using the Help>Update ImageJ command and selecting "daily build" from the drop down menu.

-wayne


> setBatchMode(true);
>
> run("Duplicate...", "title=hyper duplicate");
>
> selectWindow("hyper");
> Stack.setChannel(1);
> run("Reduce Dimensionality...",  "  frames keep");
> rename("ch1");
> run("Grays");
>
> selectWindow("hyper");
> Stack.setChannel(2);
> run("Reduce Dimensionality...", "  frames keep");
> rename("ch2");
> run("Grays");
>
> selectWindow("hyper");
> Stack.setChannel(3);
> run("Reduce Dimensionality...", "  frames keep");
> rename("ch3");
> run("Grays");
>
> setBatchMode("exit & display");