Re: Q: How to scroll image quickly in IDL 2.4.0? [message #930 is a reply to message #929] |
Fri, 12 March 1993 10:14  |
sterner
Messages: 106 Registered: February 1991
|
Senior Member |
|
|
mayor@vaxine.larc.nasa.gov writes:
> Does anybody know how to move (slide) an image (or a portion of the image)
> around in a window without using the TV command in IDL 2.4.0?
> We want to develop a display where new real-time image data enters on the
> right side and old image data scrolls to the left. This can be done by
> building a loop that shifts the whole image array, replaces the profile
> on the right and reTVs the whole image to the window, but of course it
> takes a lot of time. We hope there is a way to just move the data in the
> window by a certain amount without having to shift and reTV whole image.
> Any ideas would be greatly appreciated. Thanks.
> ============================================================ ====================
> Shane D. Mayor, Lidar Applications Group, NASA Langley Research Center,
> Mail Stop 401A, Hampton, Virginia 23681-0001
> Internet: MAYOR@VAXINE.LARC.NASA.GOV Phone: 804-864-7598 Fax: 804-864-7790
> ============================================================ ====================
There is a way. Here is an experiment.
Generate a byte image, z, that is 500 by 200.
First method:
Load the first part: tv,z(0:199,*)
for i=200,499 do begin tv,z(i-199:i,*) & endfor
This is the method that first comes to mind. It works, but not
very fast.
Second method.
Load the first part: tv,z(0:199,*)
for i=200,499 do begin device,copy=[1,0,199,200,0,0] & tv,z(i,*),199,0
& endfor (this is meant to be one long line).
The second method uses the copy option of the device procedure. It is
about 7 or 8 times faster on my computer. In the new manuals (Vers 3.0)
device,copy= is documented on page 3-6 of the IDL Reference Manual.
Ray Sterner sterner@tesla.jhuapl.edu
Johns Hopkins University North latitude 39.16 degrees.
Applied Physics Laboratory West longitude 76.90 degrees.
Laurel, MD 20723-6099
|
|
|