Posted by
L'assegnista on
Apr 28, 2014; 5:49pm
URL: http://imagej.273.s1.nabble.com/Keyboard-shortcuts-to-turn-on-and-off-channels-in-composite-mode-tp5007469p5007475.html
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