|
|
(289 intermediate revisions by 39 users not shown) |
Line 1: |
Line 1: |
| http://public.kitware.com/images/logos/vtk-logo2.jpg
| | __NOTOC__ __NOEDITSECTION__ |
| | |
| | <center>[[File:VTK_187.png]]</center> |
| <br /> | | <br /> |
| The Visualization ToolKit (VTK) is an open source, freely available software system for 3D computer graphics, image processing, and visualization used by thousands of researchers and developers around the world. VTK consists of a C++ class library, and several interpreted interface layers including Tcl/Tk, Java, and Python. Professional support and products for VTK are provided by Kitware, Inc. ([http://www.kitware.com www.kitware.com]) VTK supports a wide variety of visualization algorithms including scalar, vector, tensor, texture, and volumetric methods; and advanced modeling techniques such as implicit modelling, polygon reduction, mesh smoothing, cutting, contouring, and Delaunay triangulation. In addition, dozens of imaging algorithms have been directly integrated to allow the user to mix 2D imaging / 3D graphics algorithms and data.
| |
|
| |
|
| |
| == Documentation Improvement ==
| |
| (If you agree, <big><b>sign the [[Talk:Documentation_Improvement|petition]]!!</b></big>)
| |
|
| |
| In my experience, the single most important factor that influences a users attitude about a software package is its ease of use. VTK provides a phenomenal collection of tools for scientific data processing and visualization. However, if a user has difficulty accessing these tools, their experience with, and therefore opinion of, the software will be less than satisfactory. Documentation is the key element which controls this difficulty level. I propose some improvements to the documentation system [[Documentation Improvement|here]].
| |
|
| |
| ==Example Usage (C++)==
| |
| These are fully independent, compilable examples. There is significant overlap in the examples, but they are each intended to illustrate a different concept and be fully stand alone compilable.
| |
|
| |
| Please add examples in your areas of expertise!
| |
|
| |
| ===System Configuration/General Information===
| |
| * [[Which Libraries Do I Link To?]]
| |
| * [[Which Header Files Do I Include?]]
| |
| * [[Typical CMakeLists.txt file]]
| |
| * [[Environment Setup]]
| |
| * [[http://scv.bu.edu/documentation/tutorials/VTK/#INTRO A nice tutorial]]
| |
|
| |
| ===Preliminaries===
| |
| * [[Smart Pointers]]
| |
| * [[vtkIdType]]
| |
|
| |
| ===Simple Operations===
| |
| * [[Distance between two points]]
| |
| * [[Random number (uniform distribution)]]
| |
| * [[Random number (Gaussian distribution)]]
| |
|
| |
| ===Input and Output===
| |
| * [[Read a simple "xyz" file of points]]
| |
| * [[Read a VTP file]]
| |
| * [[Read a plain text file into a polydata]]
| |
| * [[Read a delimited file into a polydata]]
| |
|
| |
| === Geometric Objects ===
| |
| In this section, the object is created, added to a polydata object, then written to a .vtp file. The file can be opened in Paraview to see the result.
| |
|
| |
| * [[Point]]
| |
| * [[Line]]
| |
| * [[Plane]]
| |
| * [[Triangle]]
| |
| * [[Sphere]]
| |
| * [[Cube]]
| |
| * [[Polygon]]
| |
|
| |
| === Working with PolyData ===
| |
|
| |
| ==== Geometry, Colors, and Normals ====
| |
| These examples all use a triangle. The following examples show some very basic and standard things to do with polydata, such as add color and normals.
| |
|
| |
| * Corners (points (geometry) only)[[Write a file of triangle corners]]
| |
| * Corners (points+vertices (geometry and topology))[[Write a file of triangle corners (+vertices)]]
| |
| * Actual triangle[[Write a file of a triangle]]
| |
| * Set the color of each vertex of the triangle[[Write a file of colored triangle vertices]]
| |
| * Set the color of the triangle itself[[Write a file of a colored triangle]]
| |
| * Set the color of the triangle itself(how is this different from previous?)[[Write a file of a solid color triangle]]
| |
| * Add normal vectors at each vertex[[Add Normals to a Polydata]]
| |
| * Add normal vectors at each point and each vertex (what is the difference?)[[Point and Cell Normals]]
| |
|
| |
| ==== Non-standard Data ====
| |
| These examples show how to attach your own, nonstandard fields to every point or cell in a polydata.
| |
|
| |
| * [[Add Miscellaneous Data to Points in a Polydata]]
| |
| * [[Get Miscellaneous Data from Points in a Polydata]]
| |
| * [[Add Miscellaneous Data to Cells in a Polydata]]
| |
| * [[Get Miscellaneous Data from Cells in a Polydata]]
| |
|
| |
| ==== Miscellaneous (Field) Data ====
| |
| Three types of data can be stored in a polydata object, PointData, CellData, and FieldData. For PointData, there must be a piece of data associated with each point (e.g. a temperature data array with the temperature at each point). For CellData, there must be a piece of data associated with each cell (e.g. the area of each triangle). For data that does not align with either points or cells, FieldData should be used. This is typically data that describes the dataset as a whole. An example could be the name of the dataset, or the center of mass of the points, etc.
| |
|
| |
| * Using FieldData [[Add Global Miscellaneous Data to a Polydata]]
| |
|
| |
| ==== Global Operations on PolyData ====
| |
| * [[Extract Normals from a Polydata]]
| |
| * [[Get the names of all of the data arrays]]
| |
| * [[Determine data types of arrays]]
| |
| * [[Add colored lines to a Polydata]]
| |
|
| |
| ===Other File Types===
| |
| * [[Write a VTU file]]
| |
| * [[Read a VTU file]]
| |
| * [[Read an OBJ File]]
| |
| * [[Convert a series of DICOM files into a VTI File]]
| |
|
| |
| ===Utilities===
| |
| * [[Color Lookup Table]]
| |
| * [[Construct a graph]]
| |
| * [[Minimum spanning tree of a graph]]
| |
|
| |
| ===Data Structures===
| |
| * [[KDTree]]
| |
| * [[Octree]]
| |
|
| |
| ===Filters===
| |
| * [[Apply a Transformation to Points]]
| |
| * [[Landmark Transform]]
| |
| * [[Iterative Closest Points (ICP) Transform]]
| |
| * [[Triangulate a Terrain Map]]
| |
| * [[Create a surface from Unorganized Points]]
| |
| * [[Create a surface from Unorganized Points (Gaussian Splat)]]
| |
| * [[Create models from labeled volume data (Discrete MarchingCubes)]]
| |
| * [[Create cubes from labeled volume data]]
| |
|
| |
| ===Visualization===
| |
| See [[http://www.cs.uic.edu/~jbell/CS526/Tutorial/Mappers.html this]] for a brief explanation of the VTK terminology of mappers, actors, etc.
| |
|
| |
| * [[Visualize a Sphere]]
| |
| * [[Visualize a VTP File]]
| |
| * [[Visualize a 2D Set of Points]]
| |
| * [[Display coordinate axes]]
| |
| * [[Visualize and interact with an image]]
| |
| * [["Trackball" mode]]
| |
|
| |
| ===Needed/Missing Examples!===
| |
| * vtkVolumeRayCastMapper - any example of raycast/volume rendering
| |
|
| |
| ==Example Usage (Python)==
| |
| ===Getting Started===
| |
| * [[How do I setup my environment? (python)]]
| |
|
| |
| ===Working with PolyData===
| |
| * [[Write the corners of a triangle to a file (python)]]
| |
| * [[Write the corners of a triangle to a file (+vertices) (python)]]
| |
| * [[Write a triangle with colored points (python)]]
| |
| * [[Write a colored triangle (python)]]
| |
| * [[Write a solid colored triangle (python)]]
| |
| * [[Write a triangle to a file (python)]]
| |
| * [[Iterative Closest Points (ICP) (python)]]
| |
|
| |
| ==Dashboard submissions==
| |
| ===Running tests locally===
| |
| To run all of the tests on your modified source tree, simply type
| |
| <source lang="text">
| |
| ctest
| |
| </source>
| |
| in your build directory. This will not submit anything to the dashboard, but it is a good "first test" to simply see, locally, if everything works.
| |
|
| |
| ===Submitting an experimental build to the dashboard===
| |
| The idea of this type of submission is simply to have a nice way to view the output of all the tests, and to leave "proof" that you indeed tested the code. This is useful if you then commit your code and it breaks someone else's build - you can then claim you did everything you could :). To run this type of submission, simply type
| |
| <source lang="text">
| |
| make Experimental
| |
| </source>
| |
| from your build directory.
| |
|
| |
| ===Creating a 'Nightly' dashboard submission===
| |
| It is impossible for developers to test code on every operating system, compiler, and configuration. By creating a dashboard submission, you can help them find bugs that could be affecting many users but are transparent to some developers. The idea is to get the latest source code, compile it, and run a battery of tests - reporting any compile, build, and test errors to a system which very neatly arranges the results (http://www.cdash.org/CDash/index.php?project=VTK).
| |
|
| |
| It is recommended to not use the same build you work with daily for you dashboard submission. If there is a problem with the nightly cvs, your code may not compile the next day!
| |
|
| |
| To get started, create a new directory called /home/username/Dashboards/VTK. It does not actually have to be in this exactly directory, but this path will be used throughout this example to make the ideas concrete. cd to your new directory and run these commands to check out an initial version of VTK and data sets used for testing.
| |
|
| |
| [[Example CMake Dashboard file|Here]] is an example cmake dashboard file.
| |
|
| |
| You will probably want to submit a dashboard every night, so you can add a cronjob. Run 'crontab -e' and enter the following command
| |
| <source lang="text">
| |
| 0 1 * * * export DISPLAY=:0.0 ; ctest -S /home/username/Dashboards/VTK/dashboard.cmake -V > /home/username/Dashboards/VTK/dashboard.log 2>&1
| |
| </source>
| |
|
| |
| This says "at 1:00 AM, every day, every month, run the dashboard tests and log verbose output to dashboard.log". The DISPLAY variable is set to allow the tests that need an X server to complete successfully.
| |
|
| |
| == Developers Corner ==
| |
| * If you work with Paraview and VTK, the recommended procedure is to use the same source tree for both projects. That is, build Paraview from .../src/Paraview and VTK from .../src/Paraview/VTK.
| |
|
| |
| ===Examples for Developers===
| |
| * [[Simple object class]]
| |
| * [[Creating a patch]]
| |
| * [[Applying a patch]]
| |
|
| |
| ==Wiki Sandbox==
| |
| [[Ranking test]]
| |
|
| |
| ==Administrative Topics==
| |
|
| |
| * Where can I find more [[VTK Additional Information|information about VTK]]?
| |
|
| |
| * [[VTK 5.4 Release Planning]]
| |
|
| |
| * Where can I [http://vtk.org/get-software.php download VTK]?
| |
|
| |
| * Where can I download a tarball of the [http://vtk.org/files/nightly/vtkNightlyDocHtml.tar.gz nightly HTML documentation]?
| |
|
| |
| * Where can I get [[VTK Datasets]]?
| |
|
| |
| * [[VTK Classes|Extending VTK]]
| |
|
| |
| * [[VTK Coding Standards]]
| |
|
| |
| * [[VTK cvs commit Guidelines]]
| |
|
| |
| * [[VTK Patch Procedure]] -- merge requests for the current release branch
| |
|
| |
| * [[VTK Scripts|Extending VTK with Scripts]]
| |
|
| |
|
| * [[VTK Tools|VTK-Based Tools and Applications]]
| | <center>'''Welcome to the VTK Wiki, home of the latest VTK documentation and resources on the web. |
| | </center> |
|
| |
|
| * What are some [[VTK Projects|projects using VTK]]?
| | The Visualization ToolKit (VTK) is an open source, freely available software system for 3D computer graphics, image processing, and visualization used by thousands of researchers and developers around the world. VTK consists of a C++ class library, and several interpreted interface layers including Python, Tcl/Tk and Java. Professional support and products for VTK are provided by [http://www.kitware.com Kitware, Inc.] VTK supports a wide variety of visualization algorithms including scalar, vector, tensor, texture, and volumetric methods; and advanced modeling techniques such as implicit modelling, polygon reduction, mesh smoothing, cutting, contouring, and Delaunay triangulation. In addition, dozens of imaging algorithms have been directly integrated to allow the user to mix 2D imaging / 3D graphics algorithms and data. |
| | ==Start Here== |
|
| |
|
| * [[Proposed Changes to VTK | Proposed Changes to VTK]]
| | <div style="float: left; margin-right: 1%; width: 49%;"> |
| | ===Join=== |
| | : [https://vtk.org/community-support Sign up] for the VTK forum |
| | : [https://gitlab.kitware.com/vtk/vtk/-/issues Register] on the bug tracker |
| | ===Read=== |
| | : Browse the [https://docs.google.com/a/kitware.com/document/d/1nzinw-dR5JQRNi_gb8qwLL5PnkGMK2FETlQGLr10tZw/edit VTK Coding Standards] |
| | : Skim the [[VTK/FAQ | Developer's FAQ]] |
| | : Peruse a few of the [[VTK/Tutorials/External_Tutorials | External Tutorials]] |
|
| |
|
| * [[VTK FAQ|Frequently asked questions (FAQ)]]
| | ===Learn=== |
| | :Watch some of Kitware's [https://blog.kitware.com/?s=vtk+webinar VTK Webinars] |
| | :Build some of the [https://kitware.github.io/vtk-examples/site/ VTK Examples] |
| | :Read the [[VTK/Tutorials | Advanced Tutorials]] |
| | :Study the [http://www.vtk.org/doc/nightly/html Doxygen] documentation |
|
| |
|
| * [[VTK OpenGL|Common OpenGL troubles]]
| | </div> |
|
| |
|
| * [[VTK Related Job Opportunities|VTK Related Job Opportunities]]
| | <div style="float: left; width: 50%;"> |
| | ===Source Code How-to=== |
| | :[http://www.vtk.org/VTK/resources/software.html Get the VTK Source] |
| | :[https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/develop.md Create, Commit, and Share Code Changes] |
| | :[https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/build.md Configure and Build VTK] |
| | ===Check the Status=== |
| | :[https://www.openhub.net/p/vtk Black Duck Open Hub VTK page] |
| | :[https://gitlab.kitware.com/vtk/vtk/commits/master Recent commits] |
|
| |
|
| * [[VTK/Writing_VTK_files_using_python | Writing VTK files using python]]
| | ===View the Code=== |
| | :[https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/README.md Git Landing page] |
| | :[https://github.com/Kitware/VTK Github Mirror] |
| | </div> |
|
| |
|
| * [[VTK/mesh quality | Geometric mesh quality]]
| | <div style="clear: both;"></div> |
|
| |
|
| * [[VTK_XML_Formats | VTK XML Format Details]]
| | ==Resources== |
|
| |
|
| * [[VTK_Third_Party_Library_Patrol | VTK 3rd Party Library Patrol]]
| | <div style="float: left; margin-right: 1%; width: 49%;"> |
| | ; [[VTK/Dashboard_how_to|Contribute a Dashboard]]: Dashboards are an important tool we use to ensure quality. |
|
| |
|
| * [[Python Wrapping FAQ]]
| | ; [http://markmail.org/search/?q=vtk Communications]: Search the mailing list archives or use [http://www.google.com/advanced_search?as_sitesearch=www.vtk.org&as_epq=vtk-users Advanced Google search] |
|
| |
|
| * [[VTK/Executives | VTK executives]]
| | ; [http://www.vtk.org/Wiki/VTK_Datasets Data]: VTK is tested and released with datasets for visualization. |
| | </div> |
|
| |
|
| * [[VTK/Streaming | Streaming data in VTK]]
| | <div style="float: left; width: 50%;"> |
| | ; [http://open.cdash.org/index.php?project=VTK CDash]: View the VTK Quality Dashboards |
|
| |
|
| == Current Projects ==
| | ; [[VTK/BuildingDoxygen|Documentation]]: Build the VTK Doxygen documentation |
| * [[VTK/Graph Layout | VTK Graph Layout]]
| |
| * [[VTK/Java Wrapping | VTK Java Wrapping]]
| |
| * [[VTK/Composite Data Redesign | Composite Data Redesign]]
| |
| * [[VTKWidgets | VTK Widget Redesign]]
| |
| * [[VTKShaders | Shaders in VTK]]
| |
| * [[VTK/VTKMatlab | VTK with Matlab]]
| |
| * [[VTK/Time_Support | VTK Time support]]
| |
| * [[VTK/Depth_Peeling | VTK Depth Peeling]]
| |
| * [[VTK/MultiPass_Rendering | VTK Multi-Pass Rendering]]
| |
| * [[VTK/Using_JRuby | Using VTK with JRuby]]
| |
| * [[VTK/Painters | Painters]]
| |
| * [[VTK/Cray XT3 Compilation| Cray XT3 Compilation]]
| |
| * [[VTK/statistics | Statistics]]
| |
| * [[VTK/Array Refactoring | Array Refactoring]]
| |
| * [[VTK/Multicore and Streaming | Multicore and Streaming]]
| |
| * [[VTK/3DConnexion Devices Support | 3DConnexion Devices Support]]
| |
|
| |
|
| == External Links ==
| | ; [[VTK/Roadmap | Roadmap]]: Read about what's in and coming soon to VTK. |
| *[http://www.imtek.uni-freiburg.de/simulation/mathematica/IMSweb/ IMTEK Mathematica Supplement (IMS)], the Open Source IMTEK Mathematica Supplement (IMS) interfaces VTK and generates ParaView batch scripts
| | </div> |
| *[http://zorayasantos.tripod.com/vtk_csharp_examples], VTK examples in C# (Visual Studio 5.0 and .NET 2.0)
| |
|
| |
|
| == Development Process == | | <div style="clear: both;"></div> |
| The VTK Community is [[VTK/Managing_the_Development_Process | upgrading its development process]]. We are doing this in response to the continuing and rapid growth of the toolkit. A [[VTK/Architecture_Review_Board |VTK ARB]] is being put in place to provide strategic guidance to the community, and individuals are being identified as leaders in various VTK subsystems.
| |
|
| |
|
| {{VTK/Template/Footer}}
| | == Help == |
| | * Kitware offers [http://www.kitware.com/products/support.html Support Contracts] and [http://www.kitware.com/products/consulting.html Expert Consulting] |
| | * [[VTK/Deprecated_frontpage|Deprecated Frontpage]] |