SlideShare uma empresa Scribd logo
1 de 10
Baixar para ler offline
The Visualization Toolkit (VTK)
  and why you might care about it

           Jiahao Chen
           May 8, 2007
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
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.
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
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
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
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
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
VisTraj.py 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
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

Mais conteúdo relacionado

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

Hybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKitHybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKit
Ariya Hidayat
 
Shape12 6
Shape12 6Shape12 6
Shape12 6
pslulli
 
Wakanda: NoSQL for Model-Driven Web applications - NoSQL matters 2012
Wakanda: NoSQL for Model-Driven Web applications - NoSQL matters 2012Wakanda: NoSQL for Model-Driven Web applications - NoSQL matters 2012
Wakanda: NoSQL for Model-Driven Web applications - NoSQL matters 2012
Alexandre Morgaut
 

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

No Heap Remote Objects for Distributed real-time Java
No Heap Remote Objects for Distributed real-time JavaNo Heap Remote Objects for Distributed real-time Java
No Heap Remote Objects for Distributed real-time Java
 
Vtk Image procesing
Vtk Image procesingVtk Image procesing
Vtk Image procesing
 
Vtk file
Vtk   fileVtk   file
Vtk file
 
Analyzing the Performance of Mobile Web
Analyzing the Performance of Mobile WebAnalyzing the Performance of Mobile Web
Analyzing the Performance of Mobile Web
 
Android RenderScript on LLVM
Android RenderScript on LLVMAndroid RenderScript on LLVM
Android RenderScript on LLVM
 
vert.x - asynchronous event-driven web applications on the JVM
vert.x - asynchronous event-driven web applications on the JVMvert.x - asynchronous event-driven web applications on the JVM
vert.x - asynchronous event-driven web applications on the JVM
 
Instrumenting the real-time web
Instrumenting the real-time webInstrumenting the real-time web
Instrumenting the real-time web
 
Hybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKitHybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKit
 
Wakanda: NoSQL & SSJS for Model-driven Web Applications - SourceDevCon 2012
Wakanda: NoSQL & SSJS for Model-driven Web Applications - SourceDevCon 2012Wakanda: NoSQL & SSJS for Model-driven Web Applications - SourceDevCon 2012
Wakanda: NoSQL & SSJS for Model-driven Web Applications - SourceDevCon 2012
 
FLAR Workflow
FLAR WorkflowFLAR Workflow
FLAR Workflow
 
[TECHCON 2019: MOBILE - iOS]4-1.ARKit, CoreML, Turi Create 삼형제
[TECHCON 2019: MOBILE - iOS]4-1.ARKit, CoreML, Turi Create 삼형제[TECHCON 2019: MOBILE - iOS]4-1.ARKit, CoreML, Turi Create 삼형제
[TECHCON 2019: MOBILE - iOS]4-1.ARKit, CoreML, Turi Create 삼형제
 
Cocoa Design Patterns
Cocoa Design PatternsCocoa Design Patterns
Cocoa Design Patterns
 
12 Monkeys Inside JS Engine
12 Monkeys Inside JS Engine12 Monkeys Inside JS Engine
12 Monkeys Inside JS Engine
 
Conflict Resolution In Kai
Conflict Resolution In KaiConflict Resolution In Kai
Conflict Resolution In Kai
 
NoSQL and JavaScript: a love story
NoSQL and JavaScript: a love storyNoSQL and JavaScript: a love story
NoSQL and JavaScript: a love story
 
Windows Azure Interoperability
Windows Azure InteroperabilityWindows Azure Interoperability
Windows Azure Interoperability
 
Introducing spring
Introducing springIntroducing spring
Introducing spring
 
Shape12 6
Shape12 6Shape12 6
Shape12 6
 
Multi Client Development with Spring
Multi Client Development with SpringMulti Client Development with Spring
Multi Client Development with Spring
 
Wakanda: NoSQL for Model-Driven Web applications - NoSQL matters 2012
Wakanda: NoSQL for Model-Driven Web applications - NoSQL matters 2012Wakanda: NoSQL for Model-Driven Web applications - NoSQL matters 2012
Wakanda: NoSQL for Model-Driven Web applications - NoSQL matters 2012
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

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

  • 1. The Visualization Toolkit (VTK) and why you might care about it Jiahao Chen May 8, 2007
  • 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. 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. 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. 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. 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. 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. 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. VisTraj.py 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. 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