Dynamic data visualization in VTK?

Will Schroeder will.schroeder at kitware.com
Sat May 20 09:57:14 EDT 2000


Hi Maneesh-

There are many ways to do what you are trying to do. But the simplest 
techniques boil down to the following:

Step 0: Create your pipeline
Step 1: Render
Step 2: Change parameters and go to Step 1 (repeat as necessary)

For example, create a pipeline with vtkGlyph3D with one actor. (The glyph 
you choose can be as simple as a point or sphere.) The input to the glyph 
will be a cloud of points represented with vtkPoints associated with 
vtkPolyData (for example). Render this. Now as time changes, regenerate the 
point coordinates (you'll probably want to send a Modified() to make sure 
that the glypher knows to reexecute), and then rerender. Something like:

vtkPoints pts
for all points {
         set point coordinate i x y z
}
vtkPolyData pd
    pd SetPoints pts

vtkSphereSource sphereGlyph
vtkGlyph3D glypher
         glypher SetInput pd
         glypher SetSource sphereGlyph

vtkPolyDataMapper mapper
         mapper SetInput glypher
vtkActor a
         a SetMapper mapper

....etc...

for each time step {
         regenerate point coordinates
         glypher Modified()
         renWin Render
}


At 08:39 PM 5/19/2000 -0400, Maneesh Yadav wrote:
>Hi all, I am going to re-phrase my original post (hopefully to something
>more clear)
>
>In my application I have a sets of data (just positions really), and what
>I would like is for VTK to be able to visualize these; no problem.
>
>But this data can change (the positions evolve with time).  Now I
>originally assumed that VTK would take care of this for me, but it seems
>now that I may be wrong (slap me if I am wrong). Does VTK have; or is
>there any generally accepted methodology that dictates how the
>visualzation of dynamic data should be handled?
>
>Should I re-make the actors, each time the data changes?
>
>I would enjoy thinking about altering the source myself..but anything I
>can come up with seems to be quite at the 'core' level
>
>I am doing my development in python; so there are no inherent smalltalk
>like observer/notify methods and the way numbers are an immutable type
>might make this difficult.
>
>None of the examples I see really do visualize any dynamic data (load
>data; make it pretty and spin it around).
>
>BTW I did just order the book (user guide) so if my answers are in there;
>that is all I need to know.

--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------



More information about the vtkusers mailing list