Imagej Macro Batch Mode -- file unexpectedly closed

Posted by robert atwood on
URL: http://imagej.273.s1.nabble.com/Imagej-Macro-Batch-Mode-file-unexpectedly-closed-tp5010062.html

Hi,
In an imagej macro I have an open stack; I select batch mode true, duplicate a slice, then when I exit batch mode the original stack is not open anymore. I have not issued any command to close the stack.



This is part of a macro that does some tedious processing on each slice , it runs many times faster so long as batch mode and hidden mode are used, but I would rather have the original stack open at the end of the macro.

I thin I have a workaround that I would rather not use as it adds some confusing code to what should be a little macro that students can use and modify.

 The workaround is that if you
 selectImage(original);
 setBatchMode("show");
 selectImage(duplicate);
 setBatchMode(false) ;

then the original window is not closed and the duplicate is on top,  but this is a bit awkward.

Thanks!
Robert




--
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom


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