Login  Register

Re: Error when using "setBatchMode(true)"

Posted by LIM Soon Yew John (IMB) on Feb 25, 2014; 12:16pm
URL: http://imagej.273.s1.nabble.com/Error-when-using-setBatchMode-true-tp5006643p5006670.html

Dear Wayne,

Thank you, the macro works as normal after updating to the daily build.

Best Regards,
John
________________________________________
From: ImageJ Interest Group [[hidden email]] On Behalf Of Rasband, Wayne (NIH/NIMH) [E] [[hidden email]]
Sent: Tuesday, February 25, 2014 12:32 PM
To: [hidden email]
Subject: Re: Error when using "setBatchMode(true)"

On Feb 23, 2014, at 10:16 PM, LIM Soon Yew John (IMB) wrote:

> Dear All,
>
> I encounter a problem with a macro I wrote below to create RGB montage of different channels and its composite after I updated Fiji to 1.48r (32-bit). I had traced the problem to "setBatchMode(true)". When setBatchMode is set to true, run("Concatenate...", "stack1=[Ch (RGB)] stack2=[CompositE (RGB)] title=[(RGB) Ch1+Ch2+Ch3+Composite]") failed to work as it was unable to find those images.

This 1.48q regression is fixed in the latest daily build (1.48s13).

-wayne

> run("Fluorescent Cells (400K)");
> setBatchMode(true); //If disable, this macro works
> id0=getImageID();
> Stack.getDimensions(width, height, channels, t_slices, t_frames);
> Stack.getPosition(channel, slice, frame);
> ave=(width+height)/2;
> mb=round(ave*0.0058);
> if(mb<1){mb=1;}
> run("Duplicate...", "title=CompositE duplicate channels=1-3 slices=slice frames=frame");
> Stack.setDisplayMode("composite");
> id1=getImageID();
> run("RGB Color");
> selectImage(id1);run("Close");
> selectImage(id0);
> run("Duplicate...", "title=Ch duplicate channels=1-3 slices=slice frames=frame");
> Stack.setDisplayMode("color");
> id2=getImageID();
> run("RGB Color");
> selectImage(id2);run("Close");
> run("Concatenate...", "stack1=[Ch (RGB)] stack2=[CompositE (RGB)] title=[(RGB) Ch1+Ch2+Ch3+Composite]");
> run("Make Montage...", "columns=2 rows=2 scale=1 first=1 last=4 increment=1 border=mb font=12 use");
> setBatchMode("exit and display");
>
> Best Regards,
> John
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html