Keyboard shortcuts to turn on and off channels in composite mode

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Keyboard shortcuts to turn on and off channels in composite mode

L'assegnista
Dear List,
A great proportion of my time is spent by counting cells in
multi-channel confocal stacks. My problem is that it is not always easy
to analyze the colocalizations of 3 or 4 antigens in "color" or
"grayscale" mode, and I often prefer to alternate views of single and
multiple channels in "composite" mode. However, this requires to
constantly move the mouse over the channel tools window to switch on and
off channels.

It would be very useful to have keyboard shortcuts to switch on and off
individual channels in "composite" mode.

I guess it should be possible to use a macro, but it do not seem so
easy as the imageJ command that control the active and inactive state of
channels do not consider them individually:
Stack.setActiveChannels("0110")

Any help would be greatly appreciated!

Federico


--
Federico Luzzati, PhD
Researcher
Dept. Life Sciences and Systems Biology
University of Turin
Via Accademia Albertina, 13
10123 Torino
Neuroscience Institute Cavalieri Ottolenghi (NICO)
Regione Gonzole, 10
10043 Orbassano (Torino)
ITALY
tel. +39-011670-4683/ -6631

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

Re: Keyboard shortcuts to turn on and off channels in composite mode

Rasband, Wayne (NIH/NIMH) [E]
On Apr 28, 2014, at 9:23 AM, Federico Luzzati wrote:

> Dear List,
> A great proportion of my time is spent by counting cells in multi-channel confocal stacks. My problem is that it is not always easy to analyze the colocalizations of 3 or 4 antigens in "color" or "grayscale" mode, and I often prefer to alternate views of single and multiple channels in "composite" mode. However, this requires to constantly move the mouse over the channel tools window to switch on and off channels.
>
> It would be very useful to have keyboard shortcuts to switch on and off individual channels in "composite" mode.

This macro set defines keyboard shortcuts for switching on and off individual channels:

  macro "Toggle Channel 1 [1]" {Stack.toggleChannel(1);}
  macro "Toggle Channel 2 [2]" {Stack.toggleChannel(2);}
  macro "Toggle Channel 3 [3]" {Stack.toggleChannel(3);}
  macro "Toggle Channel 4 [4]" {Stack.toggleChannel(4);}
  macro "Toggle Channel 5 [5]" {Stack.toggleChannel(5);}
  macro "Toggle Channel 6 [6]" {Stack.toggleChannel(6);}
  macro "Toggle Channel 7 [7]" {Stack.toggleChannel(7);}

It requires the latest ImageJ daily build (1.49a6), which adds the Stack.toggleChannel() macro function. After installing this macro set, typing "1" is equivalent to clicking on "Channel 1" in the "Channels" dialog, typing "2" is equivalent to clicking on "Channel 2", etc. Add these macros to ImageJ/macros/StartupMacros.txt and they will be installed when ImageJ starts up.

-wayne

> I guess it should be possible to use a macro, but it do not seem so easy as the imageJ command that control the active and inactive state of channels do not consider them individually: Stack.setActiveChannels("0110")
>
> Any help would be greatly appreciated!
>
> Federico

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

Re: Keyboard shortcuts to turn on and off channels in composite mode

Cammer, Michael
Looks like stack needs to be displayed in this mode:
Stack.setDisplayMode("composite");


===========================================================================
Michael Cammer, Microscopy Core & Dustin Lab , Skirball Institute, NYU Langone Medical Center
Cell:  914-309-3270   Lab: 212-263-3208
http://ocs.med.nyu.edu/microscopy & http://www.med.nyu.edu/skirball-lab/dustinlab/

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Rasband, Wayne (NIH/NIMH) [E]
Sent: Monday, April 28, 2014 11:24 AM
To: [hidden email]
Subject: Re: Keyboard shortcuts to turn on and off channels in composite mode

On Apr 28, 2014, at 9:23 AM, Federico Luzzati wrote:

> Dear List,
> A great proportion of my time is spent by counting cells in multi-channel confocal stacks. My problem is that it is not always easy to analyze the colocalizations of 3 or 4 antigens in "color" or "grayscale" mode, and I often prefer to alternate views of single and multiple channels in "composite" mode. However, this requires to constantly move the mouse over the channel tools window to switch on and off channels.
>
> It would be very useful to have keyboard shortcuts to switch on and off individual channels in "composite" mode.

This macro set defines keyboard shortcuts for switching on and off individual channels:

  macro "Toggle Channel 1 [1]" {Stack.toggleChannel(1);}
  macro "Toggle Channel 2 [2]" {Stack.toggleChannel(2);}
  macro "Toggle Channel 3 [3]" {Stack.toggleChannel(3);}
  macro "Toggle Channel 4 [4]" {Stack.toggleChannel(4);}
  macro "Toggle Channel 5 [5]" {Stack.toggleChannel(5);}
  macro "Toggle Channel 6 [6]" {Stack.toggleChannel(6);}
  macro "Toggle Channel 7 [7]" {Stack.toggleChannel(7);}

It requires the latest ImageJ daily build (1.49a6), which adds the Stack.toggleChannel() macro function. After installing this macro set, typing "1" is equivalent to clicking on "Channel 1" in the "Channels" dialog, typing "2" is equivalent to clicking on "Channel 2", etc. Add these macros to ImageJ/macros/StartupMacros.txt and they will be installed when ImageJ starts up.

-wayne

> I guess it should be possible to use a macro, but it do not seem so easy as the imageJ command that control the active and inactive state of channels do not consider them individually: Stack.setActiveChannels("0110")
>
> Any help would be greatly appreciated!
>
> Federico

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

------------------------------------------------------------
This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.
=================================

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

Re: Keyboard shortcuts to turn on and off channels in composite mode

L'assegnista
In reply to this post by Rasband, Wayne (NIH/NIMH) [E]
Dear Wayne this is really a good news, thank you!
It works fine for me.

the only problem is that these shortcuts are the same as those used by
the cell counter to select the markers types.

I thus modified the Startup macro of the cell counter with the Function
keys (F1,F2 ..) instead of the normal numebrs (1,2..). This also
lengthen the list up to 12 markers!

macro "Type f1 [f1]" {call("CellCounter.setType", "1");}
   macro "Type f2 [f2]" {call("CellCounter.setType", "2");}
   macro "Type f3 [f3]" {call("CellCounter.setType", "3");}
   macro "Type f4 [f4]" {call("CellCounter.setType", "4");}
   macro "Type f5 [f5]" {call("CellCounter.setType", "5");}
   macro "Type f6 [f6]" {call("CellCounter.setType", "6");}
   macro "Type f7 [f7]" {call("CellCounter.setType", "7");}
   macro "Type f8 [f8]" {call("CellCounter.setType", "8");}
   macro "Type f9 [f9]" {call("CellCounter.setType", "9");}
   macro "Type f10 [f10]" {call("CellCounter.setType", "10");}
   macro "Type f11 [f11]" {call("CellCounter.setType", "11");}
   macro "Type f12 [f12]" {call("CellCounter.setType", "12");}

I also added to my startup Macros, two similar macros introducing to
more shorcuts that can be useful for those that count on multiple
channes images (like me!). The Key "g" will set the "color" mode, while
"j" set "composite" mode


macro " color [g]" {Stack.setDisplayMode("color");}
   macro "composite [j]" {Stack.setDisplayMode("composite");}


Hope this may help other counters :-)

Federico





Il 28.04.2014 17:24 Rasband, Wayne (NIH/NIMH) [E] ha scritto:

> On Apr 28, 2014, at 9:23 AM, Federico Luzzati wrote:
>
>> Dear List,
>> A great proportion of my time is spent by counting cells in
>> multi-channel confocal stacks. My problem is that it is not always
>> easy to analyze the colocalizations of 3 or 4 antigens in "color" or
>> "grayscale" mode, and I often prefer to alternate views of single and
>> multiple channels in "composite" mode. However, this requires to
>> constantly move the mouse over the channel tools window to switch on
>> and off channels.
>>
>> It would be very useful to have keyboard shortcuts to switch on and
>> off individual channels in "composite" mode.
>
> This macro set defines keyboard shortcuts for switching on and off
> individual channels:
>
>   macro "Toggle Channel 1 [1]" {Stack.toggleChannel(1);}
>   macro "Toggle Channel 2 [2]" {Stack.toggleChannel(2);}
>   macro "Toggle Channel 3 [3]" {Stack.toggleChannel(3);}
>   macro "Toggle Channel 4 [4]" {Stack.toggleChannel(4);}
>   macro "Toggle Channel 5 [5]" {Stack.toggleChannel(5);}
>   macro "Toggle Channel 6 [6]" {Stack.toggleChannel(6);}
>   macro "Toggle Channel 7 [7]" {Stack.toggleChannel(7);}
>
> It requires the latest ImageJ daily build (1.49a6), which adds the
> Stack.toggleChannel() macro function. After installing this macro
> set,
> typing "1" is equivalent to clicking on "Channel 1" in the "Channels"
> dialog, typing "2" is equivalent to clicking on "Channel 2", etc. Add
> these macros to ImageJ/macros/StartupMacros.txt and they will be
> installed when ImageJ starts up.
>
> -wayne
>
>> I guess it should be possible to use a macro, but it do not seem so
>> easy as the imageJ command that control the active and inactive state
>> of channels do not consider them individually:
>> Stack.setActiveChannels("0110")
>>
>> Any help would be greatly appreciated!
>>
>> Federico
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
Federico Luzzati, PhD
Researcher
Dept. Life Sciences and Systems Biology
University of Turin
Via Accademia Albertina, 13
10123 Torino
Neuroscience Institute Cavalieri Ottolenghi (NICO)
Regione Gonzole, 10
10043 Orbassano (Torino)
ITALY
tel. +39-011670-4683/ -6631

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