[vtkusers] Updating data while calling Render()

Andreas Brüning mail-andi at web.de
Fri Nov 21 03:12:10 EST 2008


Dear vtk user,

i have a question about updating data during a render call. The background is that i develope a multithreaded application and all threads access one single datasource. This datasource is a vtkImageData. Each thread itself handles a complete vtkpipeline and displayes the results in its  own vtkWin32OpenGLRenderWindow. To syncronize the access to the datasource i use a CriticalSection(by the way, i develope with C++ and MFC). The threads only read and does not write in the datasource. 

Do i have to enter the CriticalSection every time when i call the Render() methode in one of the vtkwindows? 
Let me explain it with a small scenario. I use vtkImageReslice to generate different views of the vtkImageData. There are also other objects in the scene like cubes, lines... . When i change the parameter of the vtkImageReslice object and call the Render methode of the vtkwindow i have to enter the critical section. When i only change one other object like maybe the position of one cube, do i also have to enter the critical section? Or does vtk recognize that it does not need to update the vtkImageReslice object? 

I want to make sure that the threads use the CirticalSection as short as possible but keep everything always syncronized. I checked the vtk soucrecode for that but honestly i cant find an answer how vtk handles this. 


Thanks in advance
Andi
_________________________________________________________________________
Sensationsangebot nur bis 30.11: WEB.DE FreeDSL - Telefonanschluss + DSL 
für nur 16,37 Euro/mtl.!* http://dsl.web.de/?ac=OM.AD.AD008K13805B7069a




More information about the vtkusers mailing list