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

Home » Public Forums » archive » Re: updating object graphics?
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: updating object graphics? [message #29293] Mon, 11 February 2002 12:35
mmiller3 is currently offline  mmiller3
Messages: 81
Registered: January 2002
Member
Thanks Rick - that did the trick. I was looking for a particular
method for each data attribute. I didn't realize that they all
could be accessed with Get and SetProperty.

Mike
Re: updating object graphics? [message #29299 is a reply to message #29293] Mon, 11 February 2002 10:12 Go to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
"Michael A. Miller" <mmiller3@iupui.edu> wrote in message
news:8766543t7o.fsf@lumen.med.iupui.edu...

> Is there a way to modify a IDLgrImage and update the display? As
> far as I can tell, there is no way to update the image in
> IDLgrImage or to remove or replace an object in a IDLgrModel
> either. Is there a place where this sort of thing is written out
> in tutorial/users' guide form?


The beauty of objects is that you can change *all* of their properties. I
don't know where it is spelled out exactly in the documentation (maybe they
assume some prior knowledge of OOP) but the IDLxxSomeobject::Init help pages
spell out most all of the built in object properties which you can Get or
Set.


If I understand you, to change an image you change it's DATA keyword:


;assuming you already have a 4 channel pixel interleaved image
;and you have set your image, view and window objects

;get the current image data
image -> GetProperty, data = imagedata

;loop alpha values from opaque to transparent
for alpha = 255, 0 , -1 do begin

;set the alpha channel in your image
imagedata[3,*,*] = alpha

;stick your new image data into your image object
image -> SetProperty, data = imagedata

;draw the new image
window -> draw, view

endfor


-Rick
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Land Mask data set available? (in lat and lon)
Next Topic: TRIGRID

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

Current Time: Wed Oct 08 19:32:03 PDT 2025

Total time taken to generate the page: 0.00473 seconds