Login  Register

toggle overlay

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

toggle overlay

Christian Goosmann
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?
Thanks a lot
Christian

--
---
Christian Goosmann
Mikroskopie
Max-Planck-Institut für Infektionsbiologie
Campus Charité Mitte
Charitéplatz 1
10117 Berlin
Tel.: +49 30 28460 388

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: toggle overlay

Rasband, Wayne (NIH/NIMH) [E]
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
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: toggle overlay

Christian Goosmann
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