This module creates a geometric representation of a lattice. 1D or 2D lattices may be used as input. The type of representation is selectable between points (0D), wireframe grid (1D), and polygons (2D). Coloring of the geometry may be done smoothly, or using a texture map with distinct color bands.

For smooth coloring, if the lattice is vector-valued the RGB color is taken from the vector and the datatype determines how the values are mapped into intensities. For byte and long data, the minimum and maximum intensities are mapped from 0 to 255. For short data, the minimum and maximum intensities are mapped from 0 to 65535. For float and double data, the minimum and maximum intensities are mapped from 0.0 to 1.0.

For smooth coloring and single-valued lattices, the colors are mapped from a Colormap if present, or else greyscale is used.

When using texture maps, the coloring is done based on the data values in a single data channel. The texture map is generated by sampling the ColorMap input when present. Otherwise a default set of colors is used. Texture maps may have 2, 4, 8, 16, 32, or 64 colors.

If there are more than three coordinates per lattice node, the extra components will be ignored. If there are fewer than three coordinates per lattice node, the missing components will be padded with zero.

Face normals may be attached to the geometry. This is required if the lattice is to be shaded with the lighting model in the renderer. Otherwise, the color will not be modulated by the lighting.

If a polygonal representation is selected, each rectangle may be created as two or four triangles. Using two triangles ignores the interpolated value of the cell center, with the advantage of lower memory consumption and faster rendering. Using four triangles makes use of the interpolated cell center value and so may yield more accurate rendering of the lattice. The color of the cell center is interpolated from the colors of the corners, rather than interpolating the actual point data, to avoid additional shading artifacts.

If an optional transform is fed in, the lattice nodes will be transformed before being output as geometry.


Port: Input
Type: Lattice
Constraints: 1..2-D
Lattice to convert into geometry.

Port: Transform
Type: Lattice
Optional: This port is optional
Constraints: 2-D
Constraints: 1-vector
Constraints: float
Optional transformation matrix to be applied to the input lattice.

Port: Colormap
Type: Lattice
Optional: This port is optional
Constraints: 1-D
Constraints: 4-vector
Constraints: float
Optional colormap to be used to map lattice data values to color in the geometry.


Port: Dimension
Type: Radio Box
Menu Item: 0D
Menu Item: 1D
Menu Item: 2D
Dimension of primitive element in geometry that is produced (0, 1, or 2D - points, lines or polygons).

Port: Normal Type
Type: Radio Box
Menu Item: No Normals
Menu Item: Face Normals
Controls whether the geometry contains face normals.

Port: Center Points
Type: Radio Box
Menu Item: Ignore Centers
Menu Item: Use Centers
Controls whether to use interpolated cell centers in polygonal rendering.

Port: Color Style
Type: Radio Box
Menu Item: Color Map
Menu Item: Texture Map
Controls the way in which colors are mapped onto the geometry.

In Color Map mode, each vertex is assigned a color according to its data value. The vertex colors are then interpolated between vertices and across faces to give continuous variation of color across the shape.

In Texture Map mode, the colors are assigned to regions of the geometry according to the range of data values at the vertices. This gives solid, distinct bands of color on the shape.

Port: Csize
Type: Slider
If texture mapping is used, the number of color bands is set to 2**n colors, where n is the value of the Csize widget. This widget is only visible when texture mapping is in force.

Port: Channel
Type: Slider
If the lattice has more than one data channel, and texture mapping is in force, then this widget is visible and the lattice is colored according to the data values in the selected data channel.


Port: Output
Type: Geometry
Geometry of the outputted shape.


Large lattices can produce a very large geometry object. It is best to keep the input lattice under 64K elements. Using cell centers with polygonal Representation at least doubles the memory requirements of the module, and is thus most useful for smaller lattices.

The texture mapped geometry can take longer to render on some architectures. Note that the default behaviour of the Render module is to switch off texturing when the viewpoint or geometry is changing.


PyrToGeom Slice MultiSlice GenerateColormap WaveFormColormap Render
[ Documentation Home ]
© The Numerical Algorithms Group Ltd, Oxford UK. 1996