Dear fellow VTK users,<br><br>I&#39;m working on a project where I will use VTK to visualize a dataset and use a multitouch device to specify certain interactions. The touch events are processed using TUIO, which has a nice library to process its events. However, this library launches a new thread to watch for the messages (that come in over UDP), and this basically disables me to update/redraw VTK from that thread.<br>

My question is the thus the following: what is the best way to send events from another thread to VTK, bearing in mind that this should happen quickly (as it is used for interaction).<br><br>The current implementation that I use for for this is quite simple (and ugly). Whenever some TUIO events are processed I put some information about this in a global variable, then the TUIO thread will generate a keystroke that will wake op the custom VTK interactorstyle, the interactorstyle will then read the global variable and do something with it, afterwards the interactorstyle will call a render() on the interactor. While this does work, it feels really hacky. Could someone propose a better method?<br>

<br>Cheers,<br>Tijmen <br>