The VTK User's Guide

Total Page:16

File Type:pdf, Size:1020Kb

The VTK User's Guide The VTK User’s Guide 11th Edition Contributors: Lisa S. Avila, Kitware Utkarsh Ayachit, Kitware Sébastien Barré, Kitware Jeff Baumes, Kitware Francois Bertel, Kitware Rusty Blue, Kitware David Cole, Kitware David DeMarle, Kitware Berk Geveci, Kitware William A. Hoffman, Kitware Brad King, Kitware Karthik Krishnan, Kitware C. Charles Law, Kitware Kenneth M. Martin, Kitware William McLenDon, SanDia National Laboratories Philippe Pebay, Sandia National Laboratories Niki Russell, Kitware William J. SchroeDer, Kitware Timothy SheaD, SanDia National Laboratories Jason Shepherd, Sandia National Laboratories Andrew Wilson, Sandia National Laboratories Brian Wylie, SanDia National Laboratories The VTK User’s Guide 11th Edition Published by Kitware, Inc. Join the VTK Community at http://www.vtk.org. Commercial support and consulting is available for this software from Kitware, Inc. Please visit http://www.kitware.com for more information or send email to [email protected]. © 2010 Kitware, Inc. http://www.kitware.com All rights reserved. No part of this book may be reproDuceD, in any form or by any means, without the express written permission of the publisher. The publisher Kitware, Inc. offers discounts on this book when ordered in bulk quantities. Kitware also publishes a companion text, The Visualization Toolkit An Object-Oriented Approach to 3D Graphics by Schroeder, Martin and Lorensen, anD proviDes commercial training, support and consulting for VTK. For more information contact Kitware, Inc. at [email protected]. All product names mentioned herein are the trademarks of their respective owners. PrinteD in Columbia. ISBN 978-1-930934-23-8 Contents Part I An Introduction to VTK Chapter 1 Welcome 3 1.1 User Guide Organization . .4 1.2 How to Learn VTK. .4 1.3 Software Organization . .4 Obtaining The Software. .5 Directory Structure . .5 Documentation. .6 Data . .6 1.4 Additional Resources . .6 Chapter 2 Installation 9 2.1 Overview . .9 2.2 CMake . .10 2.3 Installing VTK on WinDows XP, Vista or later . .10 Binary Installation . .11 Source CoDe Installation . .12 2.4 Installing VTK on Unix Systems . .14 Source CoDe Installation . .15 CMake . .15 Compiling the Source CoDe. .17 BuilDing VTK On Multiple Platforms. .17 Installing VTK. .17 Chapter 3 System Overview 19 3.1 System Architecture . .19 Low-Level Object MoDel . .20 The RenDering Engine. .21 The Visualization Pipeline. .25 3.2 Create An Application . .29 User MethoDs, Observers, anD CommanDs . .29 Tcl . .30 C++ . .30 Java . .36 Python . .36 3.3 Conversion Between Languages . .37 Part II Learn VTK By Example Chapter 4 The Basics 41 4.1 Creating Simple MoDels. .42 ProceDural Source Object . .42 ReaDer Source Object . .44 4.2 Using VTK Interactors . .45 vi vtkRenderWindowInteractor . 45 Interactor Styles . 46 4.3 Filtering Data. 48 4.4 Controlling The Camera . 49 Instantiating The Camera . 49 Simple Manipulation Methods . 50 Controlling The View Direction. 50 Perspective Versus Orthogonal Views. 50 Saving/Restoring Camera State . 51 4.5 Controlling Lights . 51 Positional Lights. 51 4.6 Controlling 3D Props . 52 Specifying the Position of a vtkProp3D. 52 Actors . 53 Level-Of-Detail Actors. 55 Assemblies . 56 Volumes . 57 vtkLODProp3D . 57 4.7 Using Texture . 58 4.8 Picking. 59 vtkAssemblyPath . 61 Example . 61 4.9 vtkCoorDinate anD CoorDinate Systems . 62 4.10 Controlling vtkActor2D . 62 4.11 Text Annotation. 63 2DText Annotation. 63 3D Text Annotation and vtkFollower . 65 4.12 Special Plotting Classes . 66 Scalar Bar . 66 X-Y Plots . 66 Bounding Box Axes (vtkCubeAxesActor2D) . 68 Labeling Data . 68 4.13 Transforming Data . 70 Advanced Transformation . 72 3D Widgets. 72 4.14 Antialiasing . 76 Per-primitive type antialiasing . 77 Multisampling . 79 4.15 Translucent polygonal geometry. 79 4.16 Animation . 83 Animation Scene (vtkAnimationScene). 83 Chapter 5 Visualization Techniques 89 5.1 Visualizing vtkDataSet (anD Subclasses) . 89 Working With Data Attributes . 89 Color Mapping . 92 Contouring . 93 Glyphing. 94 Streamlines . 95 Stream Surfaces . ..
Recommended publications
  • Mathematics Is a Gentleman's Art: Analysis and Synthesis in American College Geometry Teaching, 1790-1840 Amy K
    Iowa State University Capstones, Theses and Retrospective Theses and Dissertations Dissertations 2000 Mathematics is a gentleman's art: Analysis and synthesis in American college geometry teaching, 1790-1840 Amy K. Ackerberg-Hastings Iowa State University Follow this and additional works at: https://lib.dr.iastate.edu/rtd Part of the Higher Education and Teaching Commons, History of Science, Technology, and Medicine Commons, and the Science and Mathematics Education Commons Recommended Citation Ackerberg-Hastings, Amy K., "Mathematics is a gentleman's art: Analysis and synthesis in American college geometry teaching, 1790-1840 " (2000). Retrospective Theses and Dissertations. 12669. https://lib.dr.iastate.edu/rtd/12669 This Dissertation is brought to you for free and open access by the Iowa State University Capstones, Theses and Dissertations at Iowa State University Digital Repository. It has been accepted for inclusion in Retrospective Theses and Dissertations by an authorized administrator of Iowa State University Digital Repository. For more information, please contact [email protected]. INFORMATION TO USERS This manuscript has been reproduced from the microfilm master. UMI films the text directly from the original or copy submitted. Thus, some thesis and dissertation copies are in typewriter face, while others may be from any type of computer printer. The quality of this reproduction is dependent upon the quality of the copy submitted. Broken or indistinct print, colored or poor quality illustrations and photographs, print bleedthrough, substandard margwis, and improper alignment can adversely affect reproduction. in the unlikely event that the author did not send UMI a complete manuscript and there are missing pages, these will be noted.
    [Show full text]
  • B.Casselman,Mathematical Illustrations,A Manual Of
    1 0 0 setrgbcolor newpath 0 0 1 0 360 arc stroke newpath Preface 1 0 1 0 360 arc stroke This book will show how to use PostScript for producing mathematical graphics, at several levels of sophistication. It includes also some discussion of the mathematics involved in computer graphics as well as a few remarks about good style in mathematical illustration. To explain mathematics well often requires good illustrations, and computers in our age have changed drastically the potential of graphical output for this purpose. There are many aspects to this change. The most apparent is that computers allow one to produce graphics output of sheer volume never before imagined. A less obvious one is that they have made it possible for amateurs to produce their own illustrations of professional quality. Possible, but not easy, and certainly not as easy as it is to produce their own mathematical writing with Donald Knuth’s program TEX. In spite of the advances in technology over the past 50 years, it is still not a trivial matter to come up routinely with figures that show exactly what you want them to show, exactly where you want them to show it. This is to some extent inevitable—pictures at their best contain a lot of information, and almost by definition this means that they are capable of wide variety. It is surely not possible to come up with a really simple tool that will let you create easily all the graphics you want to create—the range of possibilities is just too large.
    [Show full text]
  • Semantic Foundation of Diagrammatic Modelling Languages
    Universität Leipzig Fakultät für Mathematik und Informatik Institut für Informatik Johannisgasse 26 04103 Leipzig Semantic Foundation of Diagrammatic Modelling Languages Applying the Pictorial Turn to Conceptual Modelling Diplomarbeit im Studienfach Informatik vorgelegt von cand. inf. Alexander Heußner Leipzig, August 2007 betreuender Hochschullehrer: Prof. Dr. habil. Heinrich Herre Institut für Medizininformatik, Statistik und Epidemologie (I) Härtelstrasse 16–18 04107 Leipzig Abstract The following thesis investigates the applicability of the picto- rial turn to diagrammatic conceptual modelling languages. At its heart lies the question how the “semantic gap” between the for- mal semantics of diagrams and the meaning as intended by the modelling engineer can be bridged. To this end, a pragmatic ap- proach to the domain of diagrams will be followed, starting from pictures as the more general notion. The thesis consists of three parts: In part I, a basic model of cognition will be proposed that is based on the idea of conceptual spaces. Moreover, the most central no- tions of semiotics and semantics as required for the later inves- tigation and formalization of conceptual modelling will be intro- duced. This will allow for the formalization of pictures as semi- otic entities that have a strong cognitive foundation. Part II will try to approach diagrams with the help of a novel game-based F technique. A prototypical modelling attempt will reveal basic shortcomings regarding the underlying formal foundation. It will even become clear that these problems are common to all current conceptualizations of the diagram domain. To circumvent these difficulties, a simple axiomatic model will be proposed that allows to link the findings of part I on conceptual modelling and formal languages with the newly developed con- cept of «abstract logical diagrams».
    [Show full text]
  • Inviwo — a Visualization System with Usage Abstraction Levels
    IEEE TRANSACTIONS ON VISUALIZATION AND COMPUTER GRAPHICS, VOL X, NO. Y, MAY 2019 1 Inviwo — A Visualization System with Usage Abstraction Levels Daniel Jonsson,¨ Peter Steneteg, Erik Sunden,´ Rickard Englund, Sathish Kottravel, Martin Falk, Member, IEEE, Anders Ynnerman, Ingrid Hotz, and Timo Ropinski Member, IEEE, Abstract—The complexity of today’s visualization applications demands specific visualization systems tailored for the development of these applications. Frequently, such systems utilize levels of abstraction to improve the application development process, for instance by providing a data flow network editor. Unfortunately, these abstractions result in several issues, which need to be circumvented through an abstraction-centered system design. Often, a high level of abstraction hides low level details, which makes it difficult to directly access the underlying computing platform, which would be important to achieve an optimal performance. Therefore, we propose a layer structure developed for modern and sustainable visualization systems allowing developers to interact with all contained abstraction levels. We refer to this interaction capabilities as usage abstraction levels, since we target application developers with various levels of experience. We formulate the requirements for such a system, derive the desired architecture, and present how the concepts have been exemplary realized within the Inviwo visualization system. Furthermore, we address several specific challenges that arise during the realization of such a layered architecture, such as communication between different computing platforms, performance centered encapsulation, as well as layer-independent development by supporting cross layer documentation and debugging capabilities. Index Terms—Visualization systems, data visualization, visual analytics, data analysis, computer graphics, image processing. F 1 INTRODUCTION The field of visualization is maturing, and a shift can be employing different layers of abstraction.
    [Show full text]
  • Beyond Infinity
    Copyright Copyright © 2017 by Eugenia Cheng Hachette Book Group supports the right to free expression and the value of copyright. The purpose of copyright is to encourage writers and artists to produce the creative works that enrich our culture. The scanning, uploading, and distribution of this book without permission is a theft of the author’s intellectual property. If you would like permission to use material from the book (other than for review purposes), please contact [email protected]. Thank you for your support of the author’s rights. Basic Books Hachette Book Group 1290 Avenue of the Americas, New York, NY 10104 www.basicbooks.com First published in Great Britain by Profile Books LTD, 3 Holford Yard, Bevin Way, London WC1X 9HD, www.profilebooks.com. First Trade Paperback Edition: April 2018 Published by Basic Books, an imprint of Perseus Books, LLC, a subsidiary of Hachette Book Group, Inc. The Basic Books name and logo is a trademark of the Hachette Book Group. The Hachette Speakers Bureau provides a wide range of authors for speaking events. To find out more, go to www.hachettespeakersbureau.com or call (866) 376-6591. The publisher is not responsible for websites (or their content) that are not owned by the publisher. Library of Congress Control Number: 2017931084 ISBNs: 978-0-465-09481-3 (hardcover), 978-0-465-09482-0 (e-book), 978-1- 5416-4413-7 (paperback) E3-20180327-JV-PC Cover Title Page Copyright Dedication Prologue part one | THE JOURNEY 1 What Is Infinity? 2 Playing with Infinity 3 What Infinity Is Not 4 Infinity
    [Show full text]
  • Pyvista: Managing & Visualizing Geospatial Data Using an Open
    PYVISTA: MANAGING & VISUALIZING GEOSPATIAL DATA USING AN OPEN-SOURCE FRAMEWORK by C. Bane Sullivan c Copyright by C. Bane Sullivan, 2020 All Rights Reserved A thesis submitted to the Faculty and the Board of Trustees of the Colorado School of Mines in partial fulfillment of the requirements for the degree of Master of Science (Hydrol- ogy). Golden, Colorado Date Signed: C. Bane Sullivan Signed: Dr. Whitney J. Trainor-Guitton Thesis Advisor Golden, Colorado Date Signed: Dr. Josh Sharp Professor and Director Hydrologic Science & Engineering Program ii ABSTRACT There is a wide range of data types present in typical hydrogeophysical studies; being able to gather all data types for a given project into a single framework is challenging and often unachievable at an affordable cost for hydrological researchers. Steep licensing fees for commercial software and complex user interfaces in existing open software have limited the accessibility of tools to build, integrate, and make decisions with diverse types of 3D geospa- tial data and models. In earth science research, particularly in hydrology, restricted budgets exacerbate these limitations, creating barriers for using software to manage, visualize, and exchange 3D data in reproducible workflows. In response to these challenges, I have created the PyVista software as an open-source framework for 3D geospatial data management, fu- sion, and visualization. The PyVista Python package provides an accessible and intuitive interface back to a robust and established visualization library, the Visualization Toolkit (VTK), to facilitate rapid analysis and visual integration of spatially referenced datasets. This interface implements spatial data structures encompassing a majority of subsurface applications to make creating, managing, and analyzing spatial data more streamlined for domain scientists.
    [Show full text]
  • Arxiv:2001.11604V2 [Cs.PL] 6 Sep 2020 of Trigger Conditions, Having an in Situ Infrastructure That Simplifies Results They Desire
    DIVA: A Declarative and Reactive Language for in situ Visualization Qi Wu* Tyson Neuroth† Oleg Igouchkine‡ University of California, Davis, University of California, Davis, University of California, Davis, United States United States United States Konduri Aditya§ Jacqueline H. Chen¶ Kwan-Liu Ma|| Indian Institute of Science, India Sandia National Laboratories, University of California, Davis, United States United States ABSTRACT for many applications. VTK [61] also partially adopted this ap- The use of adaptive workflow management for in situ visualization proach, however, VTK is designed for programming unidirectional and analysis has been a growing trend in large-scale scientific simu- visualization pipelines, and provides limited support for highly dy- lations. However, coordinating adaptive workflows with traditional namic dataflows. Moreover, the synchronous dataflow model is procedural programming languages can be difficult because system somewhat difficult to use and does not always lead to modular pro- flow is determined by unpredictable scientific phenomena, which of- grams for large scale applications when control flows become com- ten appear in an unknown order and can evade event handling. This plicated [19]. Functional reactive programming (FRP) [19,24,48,53] makes the implementation of adaptive workflows tedious and error- further improved this model by directly treating time-varying values prone. Recently, reactive and declarative programming paradigms as first-class primitives. This allowed programmers to write reac- have been recognized as well-suited solutions to similar problems in tive programs using dataflows declaratively (as opposed to callback other domains. However, there is a dearth of research on adapting functions), hiding the mechanism that controls those flows under these approaches to in situ visualization and analysis.
    [Show full text]
  • Introduction to Medical Image Computing
    1 MEDICAL IMAGE COMPUTING (CAP 5937)- SPRING 2017 LECTURE 1: Introduction Dr. Ulas Bagci HEC 221, Center for Research in Computer Vision (CRCV), University of Central Florida (UCF), Orlando, FL 32814. [email protected] or [email protected] 2 • This is a special topics course, offered for the second time in UCF. Lorem Ipsum Dolor Sit Amet CAP5937: Medical Image Computing 3 • This is a special topics course, offered for the second time in UCF. • Lectures: Mon/Wed, 10.30am- 11.45am Lorem Ipsum Dolor Sit Amet CAP5937: Medical Image Computing 4 • This is a special topics course, offered for the second time in UCF. • Lectures: Mon/Wed, 10.30am- 11.45am • Office hours: Lorem Ipsum Dolor Sit Amet Mon/Wed, 1pm- 2.30pm CAP5937: Medical Image Computing 5 • This is a special topics course, offered for the second time in UCF. • Lectures: Mon/Wed, 10.30am-11.45am • Office hours: Mon/Wed, 1pm- 2.30pm • No textbook is Lorem Ipsum Dolor Sit Amet required, materials will be provided. • Avg. grade was A- last CAP5937: Medical Image Computing spring. 6 Image Processing Computer Vision Medical Image Imaging Computing Sciences (Radiology, Biomedical) Machine Learning 7 Motivation • Imaging sciences is experiencing a tremendous growth in the U.S. The NYT recently ranked biomedical jobs as the number one fastest growing career field in the nation and listed bio-medical imaging as the primary reason for the growth. 8 Motivation • Imaging sciences is experiencing a tremendous growth in the U.S. The NYT recently ranked biomedical jobs as the number one fastest growing career field in the nation and listed bio-medical imaging as the primary reason for the growth.
    [Show full text]
  • An Open-Source, Cross-Platform Multi-Modal Neuroimaging Data Visualization Tool
    ORIGINAL RESEARCH ARTICLE published: 27 March 2009 NEUROINFORMATICS doi: 10.3389/neuro.11.009.2009 DataViewer3D: an open-source, cross-platform multi-modal neuroimaging data visualization tool André Gouws*, Will Woods, Rebecca Millman, Antony Morland and Gary Green Department of Psychology, York NeuroImaging Centre, University of York, UK Edited by: Integration and display of results from multiple neuroimaging modalities [e.g. magnetic resonance Rolf Kötter, Radboud University imaging (MRI), magnetoencephalography, EEG] relies on display of a diverse range of data Nijmegen, The Netherlands within a common, defi ned coordinate frame. DataViewer3D (DV3D) is a multi-modal imaging Reviewed by: Stephen C. Strother, Baycrest, Canada; data visualization tool offering a cross-platform, open-source solution to simultaneous data University of Toronto, Canada overlay visualization requirements of imaging studies. While DV3D is primarily a visualization David Kennedy, Harvard Medical tool, the package allows an analysis approach where results from one imaging modality can School, USA guide comparative analysis of another modality in a single coordinate space. DV3D is built on *Correspondence: Python, a dynamic object-oriented programming language with support for integration of modular André Gouws, York NeuroImaging Centre, University of York, York Science toolkits, and development of cross-platform software for neuroimaging. DV3D harnesses the Park, York YO10 5DG, UK. power of the Visualization Toolkit (VTK) for two-dimensional (2D) and 3D rendering, calling e-mail: [email protected] VTK’s low level C++ functions from Python. Users interact with data via an intuitive interface that uses Python to bind wxWidgets, which in turn calls the user’s operating system dialogs and graphical user interface tools.
    [Show full text]
  • Reconstruction of the Interpretation of Geometric Diagrams of Primary School Children Based on Actions on Various Materials - a Semiotic Perspective on Actions
    International Electronic Journal of Mathematics Education 2021, 16(3), em0650 e-ISSN: 1306-3030 https://www.iejme.com Research Article OPEN ACCESS Reconstruction of the Interpretation of Geometric Diagrams of Primary School Children Based on Actions on Various Materials - A Semiotic Perspective on Actions Lara Kristina Billion 1* 1 Goethe University Frankfurt, Frankfurt am Main, GERMANY *Corresponding Author: [email protected] Citation: Billion, L. K. (2021). Reconstruction of the Interpretation of Geometric Diagrams of Primary School Children Based on Actions on Various Materials - A Semiotic Perspective on Actions. International Electronic Journal of Mathematics Education, 16(3), em0650. https://doi.org/10.29333/iejme/11068 ARTICLE INFO ABSTRACT Received: 18 Jan. 2021 This paper adopts a semiotic perspective on mathematical learning according to Peirce, in which the actions on Accepted: 17 May 2021 material arrangements are considered the bases for diagrammatic work. The focus is on the learner’s actions using digital and analogue material arrangements which are the starting point for the reconstruction of the learner’s mathematical interpretations. In this paper a qualitative interpretative paradigm is adopted for the reconstruction. Specifically, a semiotic specification of the context analysis according to Mayring and an adoption of Vogel, is carried out. The reconstruction of the mathematical interpretation is presented with a focus on a geometrical problem that third graders are working on. Finally, the results of several cases are compared to identify possible differences between the analysed actions when using digital and analogue material arrangements. Keywords: semiotics, mathematics education, actions on material, mathematical interpretation of diagrams, primary school INTRODUCTION In mathematics education, a cognitive psychological perspective largely determines the perception of actions on the learning material and the focus is on their function as means of illustration.
    [Show full text]
  • Performing Maximum Intensity Projection with the Visualization Toolkit
    Performing Maximum Intensity Projection with the Visualization Toolkit Stefan Bruckner∗ Seminar Paper The Institute of Computer Graphics and Algorithms Vienna University of Technology, Austria Abstract intensity and the maximum intensity seen through a pixel is pro- jected onto that pixel. It looks more like a search algorithm than a Maximum Intensity Projection (MIP) is a volume rendering tech- traditional volume color/opacity accumulation algorithm. nique commonly used to depict vascular structures. The Visual- MIP is often employed in clinical practice for depicting vascular ization Toolkit (VTK) is an open source, freely available software structures. The data is a set of slices where most areas are dark, but system for 3D computer graphics, image processing, and visual- vessels tend to be brighter. This set is collapsed into a single image ization. In this paper, MIP and related methods are presented and by performing a projection through the set that assigns the bright- VTK's capabilities to use these methods are examined. est voxel over all slices to each pixel in the projection. In contrast Keywords: Visualization Toolkit, VTK, Maximum Intensity Pro- to DVR, MIP does not require the tedious generation of color and jection, MIP opacity transfer functions, but unlike SR it does still display den- sity information. In addition, since datasets usually contain a lot of noise, threshold values for SR, which allow extraction of vascular 1 Introduction structures are difficult to find. This paper gives an overview over MIP and related methods and For many scientific applications three-dimensional arrays of data shows how VTK can be used to perform these techniques efficiently.
    [Show full text]
  • Parallel Ray Tracing in Scientific Visualization
    View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by The University of Utah: J. Willard Marriott Digital Library PARALLEL RAY TRACING IN SCIENTIFIC VISUALIZATION by Carson Brownlee A dissertation submitted to the faculty of The University of Utah in partial fulfillment of the requirements for the degree of Doctor of Philosophy in Computer Science School of Computing The University of Utah December 2012 Copyright © Carson Brownlee 2012 All Rights Reserved The University of Utah Graduate School STATEMENT OF DISSERTATION APPROVAL Carson Brownlee The dissertation of has been approved by the following supervisory committee members: Charles D. Hansen 9/14/12 Chair Date Approved Steven G. Parker 9/14/12 Member Date Approved Peter Shirley 9/14/12 Member Date Approved Claudio T. Silva 9/19/12 Member Date Approved James Ahrens 9/14/12 Member Date Approved Alan Davis and by Chair of the Department of School of Computing and by Charles A. Wight, Dean of The Graduate School. ABSTRACT Ray tracing presents an efficient rendering algorithm for scientific visualization using common visualization tools and scales with increasingly large geometry counts while allowing for accurate physically-based visualization and analysis, which enables enhanced rendering and new visualization techniques. Interactivity is of great importance for data exploration and analysis in order to gain insight into large-scale data. Increasingly large data sizes are pushing the limits of brute-force rasterization algorithms present in the most widely-used visualization software. Interactive ray tracing presents an alternative rendering solution which scales well on multicore shared memory machines and multinode distributed systems while scaling with increasing geometry counts through logarithmic acceleration structure traversals.
    [Show full text]