Re: Redraw an image in IDL object [message #50267] |
Wed, 20 September 2006 09:41 |
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  |
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  |
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  |
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.")
|
|
|