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

Home » Public Forums » archive » Re: Redraw an image in IDL object
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: Redraw an image in IDL object [message #50267] Wed, 20 September 2006 09:41
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
yy writes:

> I didn't see any change of the image when running the code. Do you have
> any suggestions about what to do to update the volume data? Thanks!

If I created a volume like this:

myVol = Obj_New('IDLgrVolume', data)

I would try to "update" it like this:

myVol -> SetProperty, Data0=newData

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Redraw an image in IDL object [message #50268 is a reply to message #50267] Wed, 20 September 2006 09:39 Go to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
You are simply plotting one over the other, and in the process, losing
your reference to the first volume object (bad practice). The reason
you are not seeing a difference is that the "old" volume is probably
masking the "new" volume as both the old and new are still contained in
your model and both are being drawn the second time around.

Something like this is more appropriate:

;draw the old
myvolume = OBJ_NEW('IDlgrVolume', olddata)
mymodel -> Add, myvolume
mywindow -> Draw, myview


; draw the new
myvolume -> SetProperty, DATA0=newdata
mywindow -> Draw, myview


-Rick


yy wrote:
> I didn't see any change of the image when running the code. Do you have
> any suggestions about what to do to update the volume data? Thanks!
> -JY
>
> David Fanning wrote:
>> yy writes:
>>
>>> I have a simple question to ask. I'm using IDL objects to draw
>>> graphics. I want to display two 3D images sequentially. However, when I
>>> update the new data, IDL won't update the view. Here is what I did:
>>> myvolume = OBJ_NEW('IDlgrVolume', newdata)
>>> mymodel -> Add, myvolume
>>> mywindow -> Draw, myview
>>>
>>> Can anybody tell me what is wrong with my code? Thank you very much for
>>> your time!
>> This code doesn't "update" anything. It makes a NEW
>> something. Are you sure that's what you want? I'd guess
>> you might be drawing one volume directly on top of the
>> other.
>>
>> Cheers,
>>
>> David
>> --
>> David Fanning, Ph.D.
>> Fanning Software Consulting, Inc.
>> Coyote's Guide to IDL Programming: http://www.dfanning.com/
>> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
>
Re: Redraw an image in IDL object [message #50269 is a reply to message #50268] Wed, 20 September 2006 09:13 Go to previous message
yy is currently offline  yy
Messages: 14
Registered: September 2006
Junior Member
I didn't see any change of the image when running the code. Do you have
any suggestions about what to do to update the volume data? Thanks!
-JY

David Fanning wrote:
> yy writes:
>
>> I have a simple question to ask. I'm using IDL objects to draw
>> graphics. I want to display two 3D images sequentially. However, when I
>> update the new data, IDL won't update the view. Here is what I did:
>> myvolume = OBJ_NEW('IDlgrVolume', newdata)
>> mymodel -> Add, myvolume
>> mywindow -> Draw, myview
>>
>> Can anybody tell me what is wrong with my code? Thank you very much for
>> your time!
>
> This code doesn't "update" anything. It makes a NEW
> something. Are you sure that's what you want? I'd guess
> you might be drawing one volume directly on top of the
> other.
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Redraw an image in IDL object [message #50273 is a reply to message #50269] Wed, 20 September 2006 05:49 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
yy writes:

> I have a simple question to ask. I'm using IDL objects to draw
> graphics. I want to display two 3D images sequentially. However, when I
> update the new data, IDL won't update the view. Here is what I did:
> myvolume = OBJ_NEW('IDlgrVolume', newdata)
> mymodel -> Add, myvolume
> mywindow -> Draw, myview
>
> Can anybody tell me what is wrong with my code? Thank you very much for
> your time!

This code doesn't "update" anything. It makes a NEW
something. Are you sure that's what you want? I'd guess
you might be drawing one volume directly on top of the
other.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: plot: Messed-up coordinates when switching devices
Next Topic: plot symbols only in oplot?

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

Current Time: Wed Oct 08 13:49:41 PDT 2025

Total time taken to generate the page: 0.01085 seconds