Keyboard shortcut for slowing down/speeding up animations

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Keyboard shortcut for slowing down/speeding up animations

ashaner
In NIH Image for Mac, you could use the 0, 1, 2, etc. keys to slow down or speed up an animation. Does anyone know if there is a similar shortcut for ImageJ?
Reply | Threaded
Open this post in threaded view
|

Re: Keyboard shortcut for slowing down/speeding up animations

Rasband, Wayne (NIH/NIMH) [E]
On Apr 13, 2010, at 8:22 PM, ashaner wrote:

> In NIH Image for Mac, you could use the 0, 1, 2, etc. keys to slow down or
> speed up an animation. Does anyone know if there is a similar shortcut for
> ImageJ?

You can create keyboard shortcuts that control animation speed by adding the flowing macros to the end of the ImageJ/macros/StartupMacros.txt file.

  macro "1 fps [1]" {run("Animation Options...", "speed=1 start");}
  macro "2 fps [2]" {run("Animation Options...", "speed=2 start");}
  macro "5 fps [3]" {run("Animation Options...", "speed=5 start");}
  macro "7.5 fps [4]" {run("Animation Options...", "speed=7.5 start");}
  macro "10 fps [5]" {run("Animation Options...", "speed=10 start");}
  macro "15 fps [6]" {run("Animation Options...", "speed=15 start");}
  macro "20 fps [7]" {run("Animation Options...", "speed=20 start");}
  macro "30 fps [8]" {run("Animation Options...", "speed=30 start");}
  macro "60 fps [9]" {run("Animation Options...", "speed=60 start");}

-wayne
Reply | Threaded
Open this post in threaded view
|

Re: Keyboard shortcut for slowing down/speeding up animations

ashaner
Awesome! Thank you so much!!
Reply | Threaded
Open this post in threaded view
|

Re: Keyboard shortcut for slowing down/speeding up animations

massybird
In reply to this post by Rasband, Wayne (NIH/NIMH) [E]
Do you know the command option for Last Frame in Animation Options?  I'm looking to do something like this:

run("Animation Options...", "Last Frame=2");

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Keyboard shortcut for slowing down/speeding up animations

BenTupper
Hi,

On Jun 7, 2010, at 9:27 AM, massybird wrote:

> Do you know the command option for Last Frame in Animation Options?  
> I'm
> looking to do something like this:
>
> run("Animation Options...", "Last Frame=2");
>

Multi-word menu options get trimmed to just the first word.  Spaces  
are used to separate multiple arguments. The best way to determine the  
right argument list, when in doubt, is to turn on the handy macro  
recorder; see the menu option Plugins > Macros > Record.  I did just  
that and recorded these steps....

run("Bat Cochlea Volume (19K)");
run("Animation Options...", "speed=7 first=1 last=2");

You can see that "Last Frame" in the Animation Options GUI became  
"last=2".

Cheers,
Ben
Reply | Threaded
Open this post in threaded view
|

Re: Keyboard shortcut for slowing down/speeding up animations

massybird
Great, thank you! I tried using the record macro to find out what the command options were but I had the "Start Animation" selected when I clicked OK and that prevented the macro from being recorded... in any case, thanks for your help!