Re: toggle overlay
Posted by
Christian Goosmann on
Sep 27, 2012; 11:52am
URL: http://imagej.273.s1.nabble.com/toggle-overlay-tp5000204p5000219.html
Rasband, Wayne (NIH/NIMH) [E] wrote:
> On Sep 26, 2012, at 9:28 AM, Christian Goosmann wrote:
>
>> Dear Wizards out there,
>> I'd like to set a keyboard shortcut to toggle between 'overlay shown'
>> and 'overlay hidden'. I found no such function so I thought of writing a
>> short macro. Can someone point me to a command that does this or a
>> function that returns whether an existing overlay is hidden or shown at
>> the moment?
> Here is a macro that toggles the overlay:
>
> macro "Toggle Overlay [f1]" {
> if (Overlay.size>0) {
> if (Overlay.hidden)
> Overlay.show;
> else
> Overlay.hide;
> }
> }
>
> Add it to the StartupMacros file to have it installed when ImageJ is launched.
>
> -wayne
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
Thanks so much Wayne, works beautifully!
Christian
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html