Re: updating object graphics? [message #29293] |
Mon, 11 February 2002 12:35 |
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  |
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
|
|
|