VTK Files (original) (raw)
VTK is a data directory which contains examples of the VTK file format used by the Visualization Toolkit.
The Visualization Toolkit includes functions that can read and write graphics information in a variety of formats. For completeness, the designers included a native VTK file format.
Some 3D graphics programs, in turn, can import this VTK file format.
PARAVIEW is a 3D graphics program which can read VTK files and display the data. The home page for PARAVIEW is http://www.paraview.org/ .
VTK File characteristics:
- ASCII or binary;
The VTK file format consists of five parts; the first three are mandatory, and the last two are optional.
# vtk DataFile Version m.n
The header line. "m.n" is the version number.
a title
The title may be up to 256 characters, terminated by a new line.
ASCII or BINARY
indicates the format used for subsequent data.
DATASET type
values for type are "STRUCTURED_POINTS" or "STRUCTURED_GRID" or "UNSTRUCTURED_GRID" or "POLYDATA" or "RECTILINEAR_GRID"; Depending on the type chosen, there will be further lines of keywords and values to define the data.
POINT_DATA n
The number of data items n of each type must match the number of points in the dataset.
When describing the cells in terms of point indices, the points must be indexed starting at 0.
All point data must use 3 coordinates. Even if your model has 2D geometry, each point must have (X,Y,Z) coordinates. Simply set Z = 0 if you want to work in 2D.
Licensing:
The computer code and data files described and made available on this web page are distributed underthe GNU LGPL license.
Related Programs and Data:
NS3D_FEM a MATLAB program which sets up and solves a finite element formulation of the steady incompressible 3D Navier Stokes equations on a user-defined geometry. The program can output graphics files for TECPLOT, VU or the VTK format used by PARAVIEW.
THREED_TO_VTK, a MATLAB program which accepts computational data from a 3D finite element fluid flow program and writes it to a VTK "legacy" file for postprocessing by PARAVIEW.
TWOD_TO_VTK, a MATLAB program which accepts computational data from a 2D finite element fluid flow program and writes it to a VTK "legacy" file for postprocessing by PARAVIEW.
VITLES_TO_VTK, a C program which reads VITLES solution files and creates a VTK file suitable for graphics processing by PARAVIEW and other 3D graphics packages.
VTU, a data directory which contains examples of VTU files, an XML-based file format used by the Visualization Toolkit for unstructured grids, and which can be displayed by the PARAVIEW program;
VTK_IO, a FORTRAN90 library which reads and writes files in the VTK format.
Reference:
- Will Schroeder, Ken Martin, Bill Lorensen,
The Visualization Toolkit, An Object-Oriented Approach to 3D Graphics,
Prentice Hall, 1998,
ISBN: 0139546944,
LC: QA76.64.S36. - Amy Henderson Squillacote,
The ParaView Guide,
Kitware Inc, 2007,
ISBN13: 978-1-930934-21-4. - Kitware Incorporated,
The Visualization Toolkit User's Guide,
Kitware Inc - http://public.kitware.com/VTK/
Sample Files:
- <dec.vtk>, (ASCII format, POLYDATA) prices for DEC stock;
- <ge.vtk>, (ASCII format, POLYDATA) prices for GE stock;
- <gm.vtk>, (ASCII format, POLYDATA) prices for GM stock;
- <hello.vtk>, (ASCII format, POLYDATA) Stroked lines spell "hello";
- <ibm.vtk>, (ASCII format, POLYDATA) prices for IBM stock;
- <k.vtk>, (ASCII format, POLYDATA) VTK output;
- <mesh%5Fsmag%5F0040.vtk>, (ASCII format, UNSTRUCTURED GRID) a (U,V,W) and P flow field in a long rectangular channel;
- <polyex.vtk>, (ASCII format, POLYDATA) a cube;
- <rbc%5F001.vtk>, (ASCII format, UNSTRUCTURED_GRID), the first file of 80, which form an animation of the motion and deformation of a red blood cell.
- <rbc%5Fvtk.tar.gz>, a GZIP'ed TAR file of all 80 VTK files for the red blood cell animation.
- <texthres.vtk>, (ASCII format, STRUCTURED_POINTS) Texture map for thresholding data (use boolean textures for 2D map);
- <texthres2.vtk>, (ASCII format, STRUCTURED_POINTS) Texture map for thresholding data (use boolean textures for 2D map);
- <t.vtk>, (ASCII format, POLYDATA) VTK output;
- <triangle%5Fmesh%5Flinear.vtk>, (ASCII format, UNSTRUCTURED_GRID) an example of an unstructured grid in 2D, 8 nodes, 6 cells; (Note that 2D points must be specified with 3 components. Simply set the third component to zero!)
- <triangle%5Fmesh%5Flinear.png>, a screen shot from PARAVIEW.
- <ugridex.vtk>, (ASCII format, UNSTRUCTURED_GRID) an example of an unstructured grid in 3D;
- <vtk.vtk>, (ASCII format, POLYDATA) Line representation of "VTK";
- <v.vtk>, (ASCII format, POLYDATA) VTK output;
You can go up one level tothe DATA page.
Last revised on 06 February 2010.