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

Home » Public Forums » archive » Re: Display two images on one position
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Display two images on one position [message #28627] Wed, 02 January 2002 14:57 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
"Emmler, Oliver" <oemmler@ix.urz.uni-heidelberg.de> writes:

>> But this goes even further afield from "easy" than my
>> previous example, so I'm not sure it would meet
>> your criteria. :-)
>
> Thanks. I tried using your procedures. The scaling of the colortable/images
> will cause the picture to lose details. I think i have to use the following
> loop. Is there any way to speed it up ?
>
> FOR x = 0,510 DO BEGIN
> FOR y = 0,510 DO BEGIN
> IF highlight(x,y) NE 0 THEN TV, highlight(x:x+1,y:y+1),x,y
> ENDFOR
> ENDFOR

This may seem obvious, but if you only want to update a part of an
image, but keep the rest the same, why don't you keep a copy of the
preexisting screen image in memory. I.e., if you want to keep the
rest the same, then you better keep your own copy of the "rest." You
could wrap this in your own TV-like function.

pro mytv, img, highlight
common mytv_common, screenimg

if n_elements(screenimg) EQ 0 then begin
screenimg = img
endif else begin
wh = where(highlight, ct)
if ct then screenimg(wh) = img(wh)
endelse

tv, screenimg
end

Of course this is all toy code here, you have to deal with cases like
the image size changes, etc. Another possibility is to read the
screen image every time using TVRD() but that can get to be hairy with
true color, and/or a performance bottleneck.

Good luck,
Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Write_Image
Next Topic: Re: Display two images on one position : or even three!

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

Current Time: Fri Oct 10 02:07:28 PDT 2025

Total time taken to generate the page: 0.39920 seconds