XINTERANIMATE should be fairly straightforward. The example that is given in the Online Help for that routine shows that once you have imported data from your data file into the IDL memory space, only three fairly short lines of code are needed to create the animation viewer. The general algorithm for NetCDF data would be:
Step 1: Use NCDF_[query]-type functions to dynamically figure out what images are in your NCDF file(s) and what size IDL memory will need to store these locally.
Step 2: Allocate to an IDL variable memory for a 3D"image cube" to hold all the image "frames" that can be imported from NCDF for use in the animation.
Step 3: Fetch the images from the NCDF file(s) using procedures like NCDF_VARGET. Store these imported images as frames/planes within the 3D image cube array.
Step 4: Following the example in Online Help, run XINTERANIMATE calls like:
; Configure the settings for the animation
xinteranimate, SET=[imgWidth, imgHeight, nFrames], /SHOWLOAD
; Load the animation
for i=0, nFrames-1 do xinteranimmate, FRAME = i, IMAGE = ncdfImageCube[*,*,i]
; Play the animation:
xinteranimate, /KEEP_PIXMAPS
Is this solution more straightforward for you now?
James Jones
|