Ticket #421 (closed defect: fixed)

Opened 8 years ago

Last modified 8 years ago

Animations of stacks do not display anything

Reported by: bdezonia Owned by: bdezonia
Priority: major Milestone: imagej-2.0-alpha5
Component: Display API Version:
Severity: serious Keywords:
Cc: Blocked By:


Load T1 Head sample image. Then use Image > Stacks > Tools > Start Animation. The display does not change. Notice in the debug log that it is running. Choose Stop Animation and it the debug log shows its stopped. Fix IJ2 so that the display is updated during the animation.

Change History

comment:1 Changed 8 years ago by bdezonia

In 013bc9f9001d5c3e20e6422fe0cc044b1271a29c I have created an animation plugin located in Image :: Stacks :: Tools (which shows up twice - look near bottom) called Animate that replaces much of the original Animator class functionality.

The new plugin needs to respond to start and stop animation requests. It also needs to support IJ1's hotkey mappings. And it should terminate the animation if user specifically sets the position along the animated axis via some other command (axis pos forw, axis pos back, set axis pos).

Then the old plugins needs to be blacklisted.

comment:2 Changed 8 years ago by bdezonia

Current status:

Some of the hotkey code is in place

\ starts an animation but does not pause one
P pauses
ESC quits

\ cannot pause an animation - instead it hatches a second animation

We need a way for a plugin to grab grab focus of keyboard and only pass on events

it doesn't know about. Thus this plugin could respond to \ with pause. Note that
if someone maps P or ESC to a command they'll get launched even while animation
will be interrupted.

Unlike the original command the initial \ brings up an options dialog first.

Choosing set axis pos or axis forw or axis back does not stop animation.

Not sure it should.

Old plugin is not blacklisted yet

comment:3 Changed 8 years ago by bdezonia

  • Milestone changed from imagej-2.0-beta1 to imagej-2.0-alpha5

This ticket is related to #670

comment:4 Changed 8 years ago by bdezonia

Mostly fixed with c40fe1ddc3eecaa74ab4e9c551ee489950d0d461, 402741e73db087805350abf33d08a194bb33d90e, 9cf9f5304f1a142bd140728e0f2a3afa6d1368e9, aaa4a537aba93fce34db9ea96a864c6f29e9379d, and a6faf61f7785f77e4bd79b3df4aa62c7860d21af.

Still need to blacklist original plugins and order menu entries like IJ1.

Note that setting an axis position elsewhere does not stop running animations like IJ1 did. Maybe we should do this.

Also new Animator class can update options of an animation while its running. It does so by pausing, updating, and resuming an animation. It is possible there are race conditions related to pausing/resuming while Thread is sleeping (two places). Investigate.

comment:5 Changed 8 years ago by bdezonia

In 1b1795851752e99fd9331572a17590f136822be3 setting axis position terminates the current display's running animation.

comment:6 Changed 8 years ago by bdezonia

In 0058d4aa6f7ff7b65d5d6d3457fd58dafb89f325 old plugins now blacklisted

comment:7 Changed 8 years ago by bdezonia

In 10840a7b22b40eb76135d4291c1f715c6be65dd6 menu entries ordered correctly.

comment:8 Changed 8 years ago by bdezonia

  • Status changed from new to closed
  • Resolution set to fixed

In 97076296e03e6340dc93997e2871120e092e0b4f made a couple methods synchronized to avoid race conditions. All tasks complete.

Note: See TracTickets for help on using tickets.