[vtkusers] Updating the RenderWindows after user interaction
Sebastian Gatzka
sebastian.gatzka at stud.tu-darmstadt.de
Thu Apr 8 13:19:52 EDT 2010
Hi Eric and VTK-Users.
Yes, there is a misunderstanding! Let me explain.
I’m using VTK to visualize simulation results from our own CFD-software.
All parameters concerning the visualization is controlled through a C++-class in our (!) code.
When the VTK-part is called to visualize it loops through all the parameters.
It will check if the user wants to have scalar or vector data – especially which kind of scalar data (there are more than one).
Further it will check if there should be an implicit cutting plane or vector glyphs or streamlines.
The list goes on and on with stuff like this.
So, then interesting part is when the user changes some parameters these changes will only affect the information stored in our own class.
The VTK-part will not know anything about it, unless it will begin looping through the parameters again.
The VTK-stuff is isolated inside a function ShowRenderWindow() and everything concerning VTK will happen within.
This also means that when the user changes anything of the parameters he will be located inside a callback-function inside the ShowRenderWindow-function!
So the question will be: How can I convince the code to re-run the function ShowRenderWindow while the program is currently active inside this function?!
Hope I made myself clear.
Thanks so far.
Sebastian
Von: Eric E. Monson [mailto:emonson at cs.duke.edu]
Gesendet: Donnerstag, 8. April 2010 15:39
An: Sebastian Gatzka
Cc: vtkusers
Betreff: Re: [vtkusers] Updating the RenderWindows after user interaction
Sebastian,
I think there may be some misunderstanding, then, of what you mean when you say that the user has altered "different options of the displayed objects", and what you mean by "update".
If, after user interaction, you still have a valid pipeline from sources through filters to render window, then when the render window is asked to render itself, it wants to make sure it has all the right information, so that request is propagated up the pipeline and any sources or filters that have been Modified and need to be updated will do so. This is way the standard "demand-driven" pipeline of VTK works.
So, that's why RenderWindow->Render(); was suggested. If this doesn't answer your question you may need to clarify what type of changes are being made to the pipeline and what needs to be "updated" so that it's more clear to us why executing the pipeline won't update all of its components.
-Eric
------------------------------------------------------
Eric E Monson
Duke Visualization Technology Group
On Apr 8, 2010, at 9:12 AM, Sebastian Gatzka wrote:
Thanks for your answer.
This is not what I meant. The new parameters incorporate even the objects visualilsed itself.
So they will need to be created again as well.
I want to go through the pipeline to update it, not just to update the render window!
Am 08.04.2010 14:50, schrieb sercani:
08.04.2010 15:29, Sebastian Gatzka yazmış:
Hello.
I made some callback functions which will allow the user to alter different options of the displayed objects.
Is there a way to tell the complete render pipeline to update itself with the new set of settings?
Currently I will have to exit the Render Window and restart it to have the new settings applied.
Sebastian
_______________________________________________
Powered by www.kitware.com <http://www.kitware.com/>
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
perhaps RenderWindow->Render(); ?
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100408/975ead6f/attachment.htm>
More information about the vtkusers
mailing list