The Visualization Toolkit (VTK) and why you might care about it


Published on

Slides for my group meeting of Spring 2007, describing my visualization project for visualizing population transfer between trajectories on two different electronic states in the full multiple spawning (FMS) method.

Published in: Technology, Education
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

The Visualization Toolkit (VTK) and why you might care about it

  1. 1. The Visualization Toolkit (VTK) and why you might care about it Jiahao Chen May 8, 2007
  2. 2. Why VTK? • More control than regular application • You don’t need to care about hardware- and OS-specific details, e.g. – OpenGL vs. Mesa – X Windows vs. DirectX
  3. 3. VTK abstracts away details does, visualize data (Your Program Here) e.g. talks to does, example of Application Library calc. contour VTK e.g. talks to example of does, Graphics Library draw a triangle OpenGL e.g. talks to does, OS, hardware etc. add numbers e.g.
  4. 4. How VTK works • Stage 1: Visualization Model – What data to show? – How to visualize? – Converts data into 3D graphical elements • Stage 2: Graphics Model – What needs to be drawn? – Where to draw it? – Converts abstract graphical elements into a displayed picture
  5. 5. Stage 1: Visualization Model • Abstract objects handle data flow Source Mapper Filter raw data data processing how to draw things makes actors e.g. to draw an orbital, Point cloud Construct isosurface Triangle strips
  6. 6. Stage 2: Graphics Model Trans- Mapper form • Rendering pipeline • Data flow between Scene Actor objects viewpoint • Implemented as C++ objects Camera Light • Wrappers for Java, Python and Tcl Props where to Renderer draw things “canvas” Render Window end user
  7. 7. Execution Control End user • Visualization model is 5. User demand driven happy – Data processed from 4. draws 1. “Show me graphics the money!” source only when needed to Graphics Model • Graphics model is 3. creates 2. “ok, event driven graphics now what?” – Draws only when user Visualization Model wants it
  8. 8. VisTraj • Want to see how if trajectories from FMS dynamics ever come close to model (ideal) cone computed from CI point parameters • Want to visualize spawning events • Example data: 12 trajectories around an ethylidene intersection in ethylene
  9. 9. data flow FMSTrajectory simulation parameters ModelCone instance ConicalIntersection used to calculate h vector of numpy.array ModelCone ProjectedMomenta g vector Trajectory Population vtkDoubleArray[3] numpy.array numpy.array vtkDoubleArray Configuration Energies Coupling ProjectedTrajectory Molecule numpy.array vtkDoubleArray vtkPoints ConeActor attribute InputData GlyphActor vtkQuadric data in vtkPolyData vtkConeSource vtkSampleFunction vtkGlyph3D vtkContourFilter vtkPolyData SparkActor vtkPolyDataMapper vtkPolyDataMapper vtkActor vtkSphereSource vtkActor vtkPolyDataMapper Molecule vtkActor Axes Structure instance Main Display vtkAxesActor Outline numpy.array of vtkRenderer vtkOutlineSource Energy vtkRenderWindow props in vtkPolyDataMapper vtkRenderWindowInteractor float vtkActor vtkPNGWriter
  10. 10. Plot: 1 parent and 1 child no attribute data child Spawn X point ProjectedTrajectory vtkPoints GlyphActor vtkSphereSource vtkGlyph3D vtkPolyData vtkPolyDataMapper vtkActor InputData TubeActor vtkPolyData vtkPolyData vtkTubeFilter vtkPolyDataMapper vtkActor parent Origin = 2CI