vtk the visualiza on toolkit
play

VTK: The Visualiza.on Toolkit Part II: Visualiza.on Model - PowerPoint PPT Presentation

VTK: The Visualiza.on Toolkit Part II: Visualiza.on Model Han-Wei Shen The Ohio State University VTK Visualiza.on Model Graphics and Visualiza.on


  1. VTK: ¡The ¡Visualiza.on ¡Toolkit ¡ Part ¡II: ¡Visualiza.on ¡Model ¡ Han-­‑Wei ¡Shen ¡ The ¡Ohio ¡State ¡University ¡ ¡

  2. VTK ¡Visualiza.on ¡Model ¡ • Graphics ¡and ¡Visualiza.on ¡Model ¡ – Graphics ¡model: ¡rendering ¡ – Visualiza.on ¡model: ¡transforma.on ¡and ¡ representa.on ¡ ¡ Data Flow System: Pipeline execution Data source Visualization Graphics

  3. The ¡Role ¡of ¡Visualiza.on ¡Model ¡ • ¡Conver.ng ¡data ¡from ¡its ¡original ¡form ¡into ¡graphical ¡form ¡ ¡ • ¡Deal ¡with ¡the ¡issues ¡of ¡ transforma)on ¡and ¡ representa)on ¡ • ¡Representa.on: ¡internal ¡data ¡structures ¡ ¡ • ¡Transforma.on: ¡data ¡to ¡graphics ¡ ¡ ¡ ¡Example: ¡stock ¡price ¡display ¡ ¡ Internal ¡(computa.onal) ¡representa.on: ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Arrays ¡of ¡stock ¡prices ¡ Price[i] ¡= ¡17100, ¡16950, ¡17073, ¡17050,… ¡ ¡ Time[i] ¡= ¡10, ¡10:30, ¡11, ¡11:30, ¡12, ¡… ¡ ¡ Graphical ¡Representa.on: ¡ ¡x-­‑y ¡plot ¡ ¡

  4. 3D ¡Plot ¡Example ¡ ¡ Quadric function: f(x,y,z) = a 0 x + a 1 y + a 2 z + a 3 xy + a 4 yz + a 5 xz + a 6 x 2 + a 7 y 2 + a 8 z 2

  5. 3D ¡Plot ¡Example ¡ ¡ Quadric function: f(x,y,z) = a 0 x + a 1 y + a 2 z + a 3 xy + a 4 yz + a 5 xz + a 6 x 2 + a 7 y 2 + a 8 z 2 • Evaluate ¡the ¡func.on ¡at ¡a ¡ pre-­‑determined ¡x,y,z ¡ samples ¡

  6. 3D ¡Plot ¡Example ¡ ¡ Quadric function: f(x,y,z) = a 0 x + a 1 y + a 2 z + a 3 xy + a 4 yz + a 5 xz + a 6 x 2 + a 7 y 2 + a 8 z 2 • Evaluate ¡the ¡func.on ¡at ¡a ¡ X ¡ Y ¡ Z ¡ f ¡ pre-­‑determined ¡x,y,z ¡ 0 ¡ 0 ¡ 0 ¡ samples ¡ 1 ¡ 0 ¡ 0 ¡ • Store ¡the ¡func.on ¡values ¡ 2 ¡ 0 ¡ 0 ¡ into ¡a ¡3D ¡array ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ … ¡ … ¡ … ¡

  7. 3D ¡Plot ¡Example ¡ ¡ Quadric function: f(x,y,z) = a 0 x + a 1 y + a 2 z + a 3 xy + a 4 yz + a 5 xz + a 6 x 2 + a 7 y 2 + a 8 z 2 • Evaluate ¡the ¡func.on ¡at ¡a ¡ X ¡ Y ¡ Z ¡ f ¡ pre-­‑determined ¡x,y,z ¡ 0 ¡ 0 ¡ 0 ¡ samples ¡ 1 ¡ 0 ¡ 0 ¡ • Store ¡the ¡func.on ¡values ¡ 2 ¡ 0 ¡ 0 ¡ into ¡a ¡3D ¡array ¡ ¡ ¡ • Generate ¡a ¡3D ¡surface ¡ … ¡ … ¡ … ¡ corresponding ¡to ¡f(x,y,z) ¡= ¡c ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡(this ¡is ¡called ¡an ¡isosurface) ¡ ¡ Find all (x,y,z) f(x,y,z) = c

  8. 3D ¡Plot ¡Example ¡ ¡ Quadric function: f(x,y,z) = a 0 x + a 1 y + a 2 z + a 3 xy + a 4 yz + a 5 xz + a 6 x 2 + a 7 y 2 + a 8 z 2 • Evaluate ¡the ¡func.on ¡at ¡a ¡ X ¡ Y ¡ Z ¡ f ¡ pre-­‑determined ¡x,y,z ¡ 0 ¡ 0 ¡ 0 ¡ samples ¡ 1 ¡ 0 ¡ 0 ¡ • Store ¡the ¡func.on ¡values ¡ 2 ¡ 0 ¡ 0 ¡ into ¡a ¡3D ¡array ¡ ¡ ¡ • Generate ¡a ¡3D ¡surface ¡ … ¡ … ¡ … ¡ corresponding ¡to ¡f(x,y,z) ¡= ¡c ¡ F[x][y][z] = f(x,y,z) ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡(this ¡is ¡called ¡an ¡isosurface) ¡ ¡ Display ¡the ¡surfac e ¡ • Transformation Find all (x,y,z) f(x,y,z) = c (visualization)

  9. VTK ¡Visualiza.on ¡Model ¡ How ¡is ¡a ¡visualiza.on ¡process ¡described ¡in ¡VTK? ¡ Visualiza.on ¡pipeline: ¡ ¡It ¡describes ¡the ¡flow ¡of ¡data ¡from ¡its ¡ original ¡form ¡to ¡the ¡final ¡image ¡output ¡ ¡ Visualiza.on ¡Pipeline ¡= ¡ ¡ ¡ ¡Func.on ¡Model ¡+ ¡Object ¡Model ¡ ¡ • Func.on ¡model: ¡Transforma.on ¡ – steps ¡to ¡create ¡visualiza.on ¡(how ¡ ¡data ¡flow ¡through ¡ the ¡system) ¡ • Object ¡model: ¡objects ¡that ¡par.cipate ¡in ¡the ¡func.on ¡ model ¡ ¡ – processes ¡and ¡internal ¡data ¡structures ¡

  10. VTK ¡Func.on ¡Model ¡ ¡ • ¡Func.on ¡model ¡is ¡to ¡Illustrate ¡ Sample F(x,y,z) the ¡steps ¡to ¡create ¡visualiza.on ¡ Point Array Extract Surface : process : data Polygon : data flow direction Display

  11. VTK ¡Object ¡Model ¡ Describe ¡the ¡objects ¡that ¡par.cipate ¡in ¡the ¡func.on ¡ model ¡(visualiza.on ¡pipeline) ¡

  12. VTK ¡Object ¡Model ¡ Describe ¡the ¡objects ¡that ¡par.cipate ¡in ¡the ¡func.onal ¡ model ¡(visualiza.on ¡pipeline) ¡ • Process ¡Object: ¡Operates ¡on ¡(transform) ¡the ¡data ¡objects ¡ ¡ ¡ ¡ ¡ ¡-­‑ ¡Example: ¡genera.ng ¡surfaces ¡from ¡F(x,y,z) ¡ ¡

  13. VTK ¡Object ¡Model ¡ Describe ¡which ¡objects ¡operate ¡on ¡the ¡func.onal ¡ model ¡(visualiza.on ¡pipeline) ¡ • Process ¡Object: ¡Operates ¡on ¡(transform) ¡the ¡data ¡objects ¡ ¡ ¡ ¡ ¡ ¡-­‑ ¡Example: ¡genera.ng ¡surfaces ¡from ¡F(x,y,z) ¡ ¡ • ¡Data ¡Object: ¡Represent ¡ informa)on ¡and ¡ methods ¡to ¡create, ¡ access, ¡and ¡delete ¡the ¡informa.on ¡ ¡ ¡ ¡ ¡ ¡-­‑ ¡Example: ¡the ¡3D ¡point ¡array ¡F(x,y,z) ¡ ¡

  14. Process ¡Objects ¡ • Source: ¡ ¡Interface ¡to ¡external ¡data ¡sources ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡or ¡generate ¡data ¡procedurally ¡ Visualization model Graphics model Source Filter Mapper Actor Renderer

  15. Process ¡Objects ¡ • Source: ¡ ¡Interface ¡to ¡external ¡data ¡sources ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡or ¡generate ¡data ¡procedurally ¡ • ¡ ¡Filter: ¡ ¡ ¡ ¡ ¡Transform ¡the ¡data ¡input ¡ ¡ Visualization model Graphics model Source Filter Mapper Actor Renderer

  16. Process ¡Objects ¡ • Source: ¡ ¡Interface ¡to ¡external ¡data ¡sources ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡or ¡generate ¡data ¡procedurally ¡ • ¡ ¡Filter: ¡ ¡ ¡ ¡ ¡Transform ¡the ¡data ¡input ¡ ¡ • ¡ ¡Mapper: ¡ ¡The ¡sink ¡of ¡the ¡func.onal ¡model, ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡interface ¡with ¡the ¡graphics ¡model ¡ Visualization model Graphics model Source Filter Mapper Actor Renderer

  17. Process ¡Objects ¡(cont’d) ¡ Source Sample F(x,y,z) Point Array Filter Extract Surface Mapper + Graphics Model Polygon Objects Display

  18. Data ¡Objects ¡ Data ¡Object: ¡Dataset ¡ ¡ • ¡ ¡Structures: ¡how ¡the ¡informa.on ¡is ¡organized ¡ -­‑ ¡Topology ¡ -­‑ ¡Geometry ¡ ¡ • ¡ ¡Aeributes: ¡store ¡the ¡informa.on ¡we ¡want ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡to ¡visualize. ¡ ¡e.g. ¡func.on ¡values ¡

  19. Data ¡Objects: ¡structures ¡ • Topology: ¡ ¡ -­‑ ¡Invariant ¡under ¡geometric ¡transforma.on ¡ ¡ ¡(rota.on, ¡transla.on, ¡scaling ¡etc) ¡ -­‑ ¡Topological ¡structures: ¡Cells ¡ ¡ • ¡Geometry: ¡ ¡ -­‑ ¡The ¡instan.a.on ¡of ¡the ¡topology ¡ -­‑ ¡Geometric ¡ ¡structures: ¡cells ¡with ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡posi.ons ¡in ¡3D ¡space ¡ ¡

  20. ¡VTK ¡Cell ¡Types ¡ (d) polyline (e) triangle (b) Polyvertex (c) line (a) vertex (e) Quadrilateral (e) Polygon (f) Tetrahedron (f) Hexahedron And more

  21. VTK ¡Data ¡Aeributes ¡ • The ¡informa.on ¡stored ¡at ¡each ¡corner ¡of ¡the ¡ cell ¡ – Scalars: ¡temperature, ¡pressure, ¡etc ¡ – Vector: ¡velocitys ¡ – Normals: ¡surface ¡direc.ons ¡ – Texture ¡coordinates: ¡graphics ¡specific ¡ – Tensors: ¡matrices ¡ ¡

  22. VTK ¡Datasets ¡ A Collection of structures and attributes Structured Grid Rectilinear Grid Unstructured Points Polygonal Grid Unstructured Grid Structured Grid

  23. Pipeline ¡Connec.ons ¡ ¡ • Type-­‑Checking: ¡the ¡type ¡of ¡input ¡data ¡and ¡the ¡ expected ¡input ¡to ¡a ¡filter ¡should ¡match, ¡which ¡can ¡be ¡ checked ¡at ¡compile, ¡link, ¡or ¡run ¡.me ¡ ¡ • ¡Mul.plicity: ¡a ¡filter ¡can ¡have ¡one ¡or ¡mul.ple ¡output, ¡ and ¡each ¡output ¡can ¡have ¡mul.ple ¡fan-­‑out, ¡that ¡is, ¡ ¡ connected ¡to ¡one ¡or ¡mul.ple ¡downstream ¡processes ¡ ¡ Filter Filter Filter Data Data Data Data Data

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend