Posted by
Rasband, Wayne (NIH/NIMH) [E] on
Apr 28, 2014; 3:24pm
URL: http://imagej.273.s1.nabble.com/Keyboard-shortcuts-to-turn-on-and-off-channels-in-composite-mode-tp5007469p5007471.html
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