Example: Interactive Cine Animation

You can incorporate animation into a widget application by using the CLASSNAME keyword to assign an IDLitWindow object to WIDGET_DRAW and using the properties and methods documented in this chapter. The following widget application lets you start and stop an animation, and set the frame rate and frame increment. It is limited to this functionality only to highlight the essential features of animation. You could incorporate zooming, panning, or the addition of annotative objects (such as text, ROIs, or contours) in either the main-level model or in individual object models. See Using Multiple Models for information on how the placement of objects and models in the graphics hierarchy affects the display.

Example Code
See animation_doc.pro in the examples/doc/objects subdirectory of the IDL installation directory for the complete widget animation example. Run the example procedure by entering animation_doc at the IDL command prompt or view the file in an IDL Editor window by entering .EDIT animation_doc.pro.

Figure 10-4: Simple Widget Animation Interface

animation_application.gif