[vtkusers] problem using vtkRenderWindowInteractor with data updates under Java

Alan alan at vuesonix.com
Tue Jan 7 17:25:12 EST 2003


Thanks for the reply.  I understand the VTK/java threading dangers and 
will be certain to update data only within the AWT thread.  But, I'm 
still not clear on how to get a callback to respond in the absence of 
any action from vtkRenderWindowInteractor.  The code in 
TestVTKCanvas.java works off a Window Listener, but according to the 
javadocs, this only sends events related to:
 opening/closing,
activating/deactivating, and
iconifying.deiconifying.

How would I get a callback to execute when the vtkRenderWindowInteractor 
has no user input, but should still be updating through the frames of a 
movie?

Thanks.,
  --Alan

J.A. Lee wrote:

> You can look at TestVTKCanvas.java to see how 
> vtkRenderWindowInteractor(vtkGenericRenderWindowInteractor) works with 
> java's AWT event thread.  The examples are available in vtk4.x cvs.  
> How is your data updating?  Manually? in another process? on another 
> thread? If you are modifying the data on another thread, you must be 
> very careful that the pipeline isn't trying to update (as a result of 
> interaction) at the same time you are changing the data.  A good way 
> to do this is to only use the AWT event thread to update the data set.
> -Jeff
> Alan wrote:
>
>>
>> Hi,
>> I'm using vtk4.0 under Linux (RH7.2) with Java:, and I'm trying to 
>> find a way to allow updates to my volume-rendered data while still 
>> allowing the user to interact with object via a 
>> vtkRenderWindowInteractor .  After searching this forum, it seems 
>> like this may be possible using timers and an observer that updates 
>> the data, but implementing this has proven to be very difficult due 
>> to lack of sample code and possibly some vtk/X/Java interactions (eg, 
>> threading).
>>
>> Can anyone point me toward a simple example of Java code that allows 
>> data-updates (eg, to my volume rendered data) while allowing the user 
>> to manipulate the object via the vtkRenderWindowInteractor?
>>
>> Thanks much.
>>  --Alan
>>
>> _______________________________________________
>> This is the private VTK discussion list. Please keep messages 
>> on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/vtkusers
>>
>>
>
>





More information about the vtkusers mailing list