Introduction
This chapter describes the Visualization Toolkit (VTK) data format. This data format is used by the VTK visualization toolkit developed by Kitware. VTK is a software system for 3D computer graphics, image processing and visualization. The VTK data format is the primary data structure used internally in Geocap, and as such is a basic component of more complex data structures such as those found in the petroleum or GIS industry. The VTK format combines a powerful data representation with a structure well suited to visualization.
Work in Geocap can be undertaken without detailed knowledge of VTK, although familiarity with concepts like data types, grids, and data attributes will enhance your understanding of data operations and display.
On this page:
Coordinate Systems
Before data structures are discussed, it is useful to review the basics of coordinate systems. A coordinate system maps a tuple of numbers to a point in mathematical space. In Geocap we are mainly concerned with two and three-dimensional space, customarily denoted by the X, Y, and Z axes. Two and three dimensional space is commonly referred to as 2D and 3D space.
Datasets
Datastes are the basic entities of all operations related to data manipulation and display. They are also the building blocks that constitute a project. In Geocap, datasets are often, but not always, geometrical representations of bodies in 3D space. A dataset may also represent less tangible entities like velocity fields, petrophysical parameters and seismic images.
A dataset consists of geometry, topology, and attributes. The geometry part is essentially a collection of points in 2D or 3D space. Topology defines the structure of the dataset, or how the points are connected. Points may be connected in a triangle, for example. A triangle is a so-called cell. Cells define the topology, much like points define the geometry. Cells will be covered in more detail shortly. Even though the points may change their positions (changing their geometry) they would still form a triangle, thus retaining their topological property. Finally, attributes are auxiliary data associated with the geometry (points) or topology (cells). Attributes are quantities that exist in the spacial positions determined by the geometry. Examples of attributes are temperature, permeability, velocity, and saturation. Attributes will also be covered in more detail shortly.
Points in a dataset are often structured according to certain rules and regularities. These properties determine the type of the dataset, also called datatype. The main datatypes in Geocap are polydata, grids, and images.
Points
Points define the geometry of a dataset, positioning the data in 2D or 3D space. Datasets may contain anywhere from one point to millions of points. A single point is denoted by a tuple containing two or three components, depending on whether the point is positioned in 2D or 3D space. Moreover, points may be arranged in a regular or irregular manner. A regular lattice arrangement is called a grid, or structured points. Irregularly positioned points form a dataset of type polydata, which will be covered in more detail shortly.
Cells
Cells connect points into geometrical shapes like lines and triangles. The shape of the cell defines the topological properties of the dataset. Geocap uses only a subset of the cell types available in VTK. The cell types used are points, lines, polygons and triangle strips. The point cell type is actually called a vertex. When dealing with a large number of points they are usually combined to form a polyvertex cell. A line simply connects two points, while a polygon connects several points using line segments. Triangle strips are adjacent triangles useful for creating irregular surfaces.
Attributes
Attributes are values attached to the points or cells of the dataset. They represent additional information, or spatial quantities, dispersed in space according to the geometry (points or cells) to which they are attached. An attribute is a point attribute if it is attached to the points of the dataset, and a cell attribute when attached to the cells. Common point attributes found in Geocap are height, RGB components in an image, and seismic amplitude. Examples of a more general scientific nature would be velocity and temperature.
It is useful to think of data attributes as "columns", where each row corresponds to the points to which it is associated. The following listing shows temperature and pressure distributed as separate values for a set of points.
POINT X Y Z TEMPERATURE PRESSURE 0 3.4 234.3 45.12 0.43 45.6 1 5.6 290.5 55.63 0.44 45.5 2 6.67 300.3 78.00 0.45 45.3 ... ...
An attribute always has a name, and are sometimes called field data.
VTK Data types
Polydata
Grid
Images