Login  Register

Re: problem with roiManager in script

Posted by Aryeh Weiss on Apr 30, 2014; 3:51am
URL: http://imagej.273.s1.nabble.com/problem-with-roiManager-in-script-tp5007489p5007499.html

On 4/30/14, 2:39 AM, Rasband, Wayne (NIH/NIMH) [E] wrote:

> On Apr 29, 2014, at 1:48 PM, Aryeh Weiss wrote:
>
>> roiManager("Open", filename) does nto open the ROI manager when my script has setBatchMode(true).
>>
>> Here is a minimal script that reproduces the problem:
>>
>> setBatchMode(true);
>> roiManager("Open", <valid path to a zip file containing an roiset>);
>> setBatchMode(false);
> To improve performance, the ROI Manager is not displayed in batch mode macros but other than this it works as expected. Run this version of your macro and you will see that the ROI set was opened:
>
>    setBatchMode(true);
>    roiManager("Open", <path to a zip file containing an ROI set>);
>    print("count: "+roiManager("count"));
>
>
Thank you for your prompt reply.

I thought that this may be the case, but I was surprised that the ROI
window did not come back when I switch batch mode to  false, and was not
available even after the macro terminated. After the macro terminated,
opening the ROI manager through Analyze>Tools brought up a blank ROI
manager, so I could not figure out how to get at my newly opened ROI set.

--aryeh

--
Aryeh Weiss
Faculty of Engineering
Bar Ilan University
Ramat Gan 52900 Israel

Ph:  972-3-5317638
FAX: 972-3-7384051

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