xmovie [message #1654] |
Thu, 17 February 1994 09:39 |
jjp
Messages: 2 Registered: February 1994
|
Junior Member |
|
|
XINTERANIMATE provides nice animation on X windows, but the
required multiple calls to XINTERANIMATE are awkward.
Here's "xmovie" which is a simple "wrapper" routine with the
same calling syntax as the old "movie" routine:
pro xmovie, stack
;
; IDL procedure to use xinteranimate.
; This procedure is written to have the same syntax as "movie".
;
; J Pekar
; 17 Feb 94 first writing
size_info=size(stack)
if size_info(0) ne 3 then begin
print, ' '
print, ' Sorry, but xmovie says "I need a 3D array!" '
print, ' '
return
end
sizex=size_info(1)
sizey=size_info(2)
nframes=size_info(3)
XINTERANIMATE, SET = [Sizex, Sizey, Nframes]
if size_info(4) eq 1 then begin
for i=0, nframes-1 do XINTERANIMATE, IMAGE=stack(*,*,i), FRAME=i
end else begin
bstack=bytscl(stack)
for i=0, nframes-1 do XINTERANIMATE, IMAGE=bstack(*,*,i), FRAME=i
end
XINTERANIMATE
XINTERANIMATE,/CLOSE
return
end
Jim Pekar jjp@helix.nih.gov "Simplify, then exaggerate."
|
|
|