Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Section
Column
width70%

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 an open source 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 displayfor algorithms and visualization.

Column
width30%



On In this pagesection:

Table of Contents

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

...

maxLevel2

Datasets

Datasets are usually geometrical representations of surface and body shapes in 3D space. In additon datasets may represent velocity fields, petrophysical parameters and , seismic images and virtually any kind of recorded data.

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 triangleinto lines or triangles or, for example. A triangle is a so-called cellThe connecting structure are called cells. 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

Points and cells may have associated attributes that are part of the dataset. 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 , by positioning the data in 2D or 3D space. Datasets may contain anywhere from one point to several hundred 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..
Points with no interal structure are called freepoints.

Cells

Cells can 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 primary 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 simple line simply connects two points, while a polygon connects several points using line segments. Triangle strips are adjacent triangles useful for creating irregular surfaces.
Image Added
The primary cell types

Attributes and field data

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.

...

titleExample file 1

...

The scalars follows the geometry in this case.

No Format
bgColor#eeeeee
borderWidth1
     POINT    X       Y       Z     scalars   TEMPERATURE   PRESSURE
 PRESSURE     0      3.4    234.3   45.12     45.12      0.43           45.6
      1      5.6    290.5   55.63     55.63      0.44           45.5
      2      6.67   300.3   78.00     78.00      0.45           45.3
      ...
      ...

An attribute always has a name, and . They are sometimes called field data.

...

also called field data as they are saved as field data in a vtk dataset. A similar list will be produced by Table View that is found on the right click menu for every dataset in the project.

Scalars
A special attribute type in Geocap is called scalars. When a structure is mapped, the colors of the map are according to the scalars. The scalar values can be the geometry itself. The map colors will then show the geometry. Otherwise the map will have colors from the scalar attribute.

VTK Data types

The main datatypes in Geocap are polydata (points and lines), grids (structures points), and images.

Polydata

A dataset of type polydata may contain any cell type except 3D cells.
Examples of point data:

  • Well positions
  • Single and multibeam sonar data
  • Bathymetry data

Examples of line data:

  • Seismic surveys
  • Fault lines
  • Well data (including all log attributes)

Examples of surface data

  • Triangles and triangle strips.
    Triangles are often stitched together to form triangle strips that

...

  • area suitable for displaying irregular surfaces.

The Vtk data format allows for mixing cell types in the same dataset. In practice, most polydatasets polydata sets in Geocap contain only one cell type.

Image Removed
Two commonly used polydata types: triangle surface and irregular points

Polydata has a so-called explicit point representation. This means that each point's coordinate values are contained in the dataset. Since poly data points have no inherent structure and thus may appear anywhere in space, we need to store their actual coordinate values in order to infer their position. A common way of representing data is column format. The X, Y, Z coordinates are displayed in separate columns along with any additional data like in the #example file.

Grid

A grid is a regular lattice of points aligned with the coordinate axes. In Geocap this type of grid is also referred to as structured points, while other sources use the term uniform grid.

The size of a grid is determined by its dimensions and increments. The dimensions are the number of grid cells nodes in each direction. The cell node count in the X- and Y-direction are called rows and columns, respectively. The increment is the spacing between each grid cellnode. The increments are uniform along a given axis, although the X- and Y-axes may have different increments.

Image Removed
A simple illustration of a grid

Grids use an implicit point representation. This means that the point xy coordinates of the points in 2D/3D space are not stored directly in the dataset. Rather, the xy position is calculated by multiplying the cell node index with the grid increment. Only the node values are stored explicitely.

The following listing of a digital elevation model (DEM) shows how the z-values (height) are positioned in separate grid cellsnodes, each with separate row/column values. Row and column positions are customarily denoted with a (i, j) index.

Code Block
titleExample file 2
No Format
bgColor#eeeeee
borderWidth1
        POINT  i    j    HEIGHT
        0      0    0     34.3
        1      1    0     34.4
        2      2    0     34.5
        3      0    1     34.2
        4      1    1     34.3
        5      2    1     34.6
        ...
        ...

With a grid increment of 4 meters point 5 would be in position (x, y) = (2*4, 4) = (8, 4). Note that the origo need not be in position (0, 0, 0).

There are two main grid forms of type structured points in Geocap:

  1. Surface grid. Also called 2d 2.5d grid and is the form just described.
  2. Cube grid. Also called cube or 3d grid.

Image Added
2d grid to the left and 3d grid to left

Undefined values in grid
A grid may have regions that is not part of the grid surface (or cube body for 3d grids). Geocap uses a value called undef to indicate those grid nodes. They play an important part in the grid definition and layout. A Table View listing of a grid will list the undefined values as void.

Images

Images are similar to grids. In fact, they share the same data structure. They differ, however, in that images are expected to show colors or gray-tones. Each grid cell therefore represents an image pixel, and gets its color from the associated attribute data. Color images would therefore contain three data attributes for each point, namely the red, green, and blue color components. Each value is in the 0-255 range. This is depicted in the following listing.

Code Block
titleExample file 3
No Format
bgColor#eeeeee
borderWidth1
      POINT  I    J    RED  GREEN  BLUE
   BLUE  0   0    0    0    120   210    77
 77     1  1    1    0     73    56    27
 27     2  2    2    0     15   110    99
99      3  3    0    1     84    57    51
 51     4  4    1    1     51    72    11
     11 5  5    2    1     67    11    87
 87       ...
        ...

An image consisting of a rectangular array of pixels is an example of raster graphics, as opposed to the vector graphics created by polydata.

Image Added
The Amazon rainforest (NASA)