comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Q: How to scroll image quickly in IDL 2.4.0?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Q: How to scroll image quickly in IDL 2.4.0? [message #929] Fri, 12 March 1993 10:17
zawodny is currently offline  zawodny
Messages: 121
Registered: August 1992
Senior Member
In article <1nq3cgINNbed@rave.larc.nasa.gov> 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.
>

As far as I know, there is no way to pan and scan a TVed image on a
device that does not support that feature in hardware. I do have a suggestion
that might increase the speed of what you are doing. Create a pixmap window
(or you could do this with an array in memory) equal in size to the portion of
the display where the image scrolling will take place (I assume this might be
specified by the box defined by !P.CLIP). Initially the pixmap will be empty.
As profiles come in add them one by one to the right side of the pixmap and use
DEVICE,COPY=... to place the partial image in the display area. Continue this
until the pixmap becomes full. When you are ready to start scrolling the
image, do so in the following manner. Simply reset a pointer (use the math
function MOD) to the first profile in the pixmap (this is now the oldest
profile) and overwrite it with the new data. Then use DEVICE,COPY=... twice to
place the image in the display area in two pieces (Right most portion of the
pixmap goes into the lefthand portion of the display and the leftside of the
pixmap goes to the right). Increment the pointer by one and continue this
process indefinitly (resetting to the beginning each time you reach the end of
the pixmap). This eliminates the need to move each profile one step to the
left in an array and uses DEVICE,COPY=... which is very fast for imaging.

Any further questions ask via email.

--
Joseph M. Zawodny (KO4LW) NASA Langley Research Center
Internet: zawodny@arbd0.larc.nasa.gov MS-475, Hampton VA, 23681-0001
Packet: ko4lw@wb0tax.va.usa
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 Go to previous message
sterner is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Q: How to scroll image quickly in IDL 2.4.0?
Next Topic: Re: QUESTION: special characters in postscript output

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:31:39 PDT 2025

Total time taken to generate the page: 0.00517 seconds