# The Lattice Data Type

A lattice is an array of values. Bergeron and Grinstein use the notation Lpq for a p-dimensional lattice of q-dimensional data. The dimensionality of the lattice gives its ordering, e.g., unordered data has dimension 0, a vector of data elements has dimension 1, and an array has order 2.

## Iris Explorer Lattice type

### Introduction

The lattice data type has two arrays, one for the data values (cxData) and one for node coordinates (cxCoord). A node is a point in a lattice defined by a unique coordinate or set of coordinates in Cartesian space. The node values usually indicate the position of the data values. Either one, or both, of the arrays is optional.

There are two dimension variables. NDim is the number of dimensions of the data array (not the number of values in the array). dims is a vector of integer values specifying the number of nodes in each of the nDim dimensions. NDim and dims are defined in the data structures of both cxData and cxCoord, and have the same value in each.

### The cxData Structure

The cxCoord Structure that contains the Cartesian coordinate values that define the position of the lattice nodes, consists of the following:

• the dimension variables, nDim and dims
• the type of physical mapping, coordType (uniform, perimeter, and curvilinear)
• the number of coordinates per node, nCoordVar
• the array of coordinate values

An example of a 2D lattice structure with seven nodes in each direction and three data variables per node would be the following: nDim = 2, dims[0] = 7 (y direction), dims[1] = 7, (x direction), and nDataVar = 3.

Depictions of different types of lattices:

### Lattice Examples Generated in IRIS Explorer

A colormap is a 1D uniform lattice with four variables per node (RGBA). The elements are: nDim =1 (although it is possible for a colormap to be a function of more than one variable, Explorer currently only has tools for 1D colormaps)

• dims = 256
• nDataVar = 4 (red, green blue, alpha)
• primType = float
• coordType = uniform

A 2D image is a 2D lattice with either one variable (gray scale), or three variables (RGB), or four variables (RGBA) per node. The elements are:

• nDim = 2
• dims = any depending on size of the image
• nDataVar = 1 (gray scale) or 3 (red, green blue) or 4 (red, green blue, alpha)
• primType = byte
• coordType = uniform (the image can be distorted , e.g. "fisheye images", and thus use curvilinear coordinates
Last modified on February 11, 1999, G. Scott Owen, owen@siggraph.org