Play Through Image Series Quickly

The Cine module is used to play through a series of images very quickly. The series of images should be the same size, and contrain unsigned bytes that reference a common colormap, which is associated with the series as an attribute named "color map". The module creates and manages its own window, and caches the set of images corresponding to the members of the series. These are then cycled through when the left or middle button is pressed in the Cine window. The window and all associated data structures are deleted when the right button it pressed.

By default, Cine attempts to use the series positions of the series members to determine frame rate in seconds: if the series positions are 0, 1, ... n then the frames will be displayed one per second, whereas if they are 0.0, 0.1, ... n/10 then they'll be displayed at 0.1 second intervals. Irregular intervals are supported. The first parameter to Cine allow this to be scaled; if this parameter is set to k, then the time steps used will be k * series position. If k = 0, then the frame rate will be as fast as possible.

An example script is included. This script creates a volume centered at the origin, with 21 steps in the x and y directions, and 101 in the Z direction. Compute is used to apply a mathematical function to the volume, resulting in ubyte data. The volume is then sliced to create 101 21x21 images. This is then passed into Refine, allowing the images to be increased in size; when the level input to Refine is set to k, the resolution of the output will be (2**k) * 20 + 1. By varying this you can see how the resolution of the images affects the display rate.

A color map is created by selecting the first member of the series and passing it into AutoColor, with min set to the entire series and with the delayed flag set. This colormap is then extracted from the series member and associated with the entire series and passed into Cine. Another interactor is used to control the time scale parameter to Cine. Set this to 0 to get maximum display speed.

Cine is particularly useful with the output of Quantize.

Build the executive: make dxexec

Run the demo script: dx -exec dxexec -mdf Cine.mdf Cine

Directory name: contrib/modules/cine

Other files in this directory:

Return to Assorted Useful Modules

See license


[ Previous Page | Next Page | Table of Contents | DX Home Page ]
[ IBM home page | Order | Search | Contact IBM | Help | (C) | (TM) ]