User's Reference - AutoColor

### AutoColor

Category

Transformation

Function

Automatically colors a field.

Syntax

    mapped, colormap = AutoColor(data, opacity, intensity, start, range,
                                 saturation, min, max, delayed, outofrange);

Inputs

Name | Type | Default | Description
--- | --- | --- | ---
`data` | data field | none | field to be colored
`opacity` | scalar | input dependent | opacity, between 0 and 1
`intensity` | scalar | 1.0 | color intensity
`start` | scalar | 0.6666 | starting color (default = blue)
`range` | scalar | 0.6666 | range of color (default = blue to red)
`saturation` | scalar | 1 | saturation, between 0 and 1
`min` | scalar or data field | min of data | minimum of data to be colored
`max` | scalar or data field | max of data | maximum of data to be colored
`delayed` | flag | 0 | 0: apply maps 1: delay applying color and opacity maps (byte data only)
`outofrange` | vector list or string list | [.3 .3 .3] | how to color out-of-range points

Outputs

Name | Type | Description
--- | --- | ---
`mapped` | color field | color-mapped input field
`colormap` | field | RGB color map used

Functional Details

This module colors a specified field (`data`) by mapping hues to data values.

`data` | is an input field with data. If the input is a vector field, the colors are based on the magnitude of the data. If the input consists of matrices, the colors are based on the determinants.
`opacity` | specifies the opacity of the resulting object. Allowed values range from 0 to 1. Its default value is 1 for surfaces and 0.5 for volumes.
`intensity` | scales the amount of color. For opaque surfaces, the parameter scales from black (0) to full color (1). For volumes, it controls the brightness of the object when viewed along its longest dimension. Values greater than 1 can be used to brighten translucent surfaces or volumes that appear too dim. See also "Coloring Objects for Volume Rendering".
`start` and `start` - `range` | specify the colors applied to the minimum and maximum data values mapped. By default, the minimum data value is colored blue (0.6666), and the maximum is colored red (0 or 1; colors are defined cyclically from -&infinity; to &infinity;, so that a `start` of -1 = 0 =1, and so on).
`saturation` | specifies the saturation of the colors used. This value must be between 0 and 1.
`min` and `max` | specify the minimum and maximum data values mapped. If neither is specified, the minimum and maximum values of `data` are mapped. If `min` is scalar, the minimum data value is mapped to that value. If `min` is a data field, the minimum data value of that field is used. The `max` parameter is interpreted in corresponding fashion. If `min` is a data field and `max` is unspecified, the module uses the minimum and maximum values of that field. For volumes, regions with values outside the `min`-`max` range are invisible; for surfaces, such regions are gray by default.
`delayed` | determines whether "delayed colors" are created. Such colors are available only for byte data and they use less memory. When `delayed` = 1: The "colors" component is a pointer to the "data" component, and a "color map" component is created. (This component is a color lookup table with 256 entries, representing the appropriate color for each of the 256 possible data values.) If `opacity` is also specified, an opacity map is created with 256 entries, while the "opacities" component is a copy of the "data" component. The module adds a "direct color map" attribute to the output object. (See "Using Direct Color Maps".)
`outofrange` | specifies the coloring of data that fall outside the `min`-`max` range. This parameter applies only to surfaces; out-of-range data values for volumes are always invisible. If the parameter value is a single color (RGB vector or color-name string), it is applied to both the upper and lower out-of-range points. If it is a list of two colors, then it is applied to the lower and upper out-of-range points, respectively. Color strings can be any of the defined color-name strings (see Color) or either of strings "color of min" and "color of max."

Notes:

1. AutoColor adds colors to the "colors" component. For "front colors" or "back colors," use the Rename module following AutoColor. (See Appendix E. "Data Explorer Fonts", in IBM Visualization Data Explorer User's Guide.)

2. This module also outputs the RGB color map used, in the output `colormap`. The "positions" component contains the data values, and the "data" component contains the corresponding RGB colors. You can use this color map as an input to the ColorBar module. For byte data, the color map always contains 256 entries for the 256 possible data values. If the input to AutoColor is a group, then a different color map will be constructed for each member of the group. In that case, the `colormap` output of the module is a group of color maps. Use the Select module to select the color map you want to display using ColorBar.

3. If you AutoColor a group of volumes, you may find that the resulting image is black because the renderer does not support coincident volumes.

Components

Adds a "colors" component. An "opacities" component is added if `opacity` is less than 1 or if the input data is a volume. If `delayed` = 1, the "colors" component is a copy of the "data" component and a "color map" component is created. Similarly, an "opacity map" component is created if `opacity` is less than 1 or the input is a volume.

Example Visual Programs

Many example visual programs use AutoColor, including:

    AlternateVisualizations.net
    ContoursAndCaption.net
    InvalidData.net
    MappedIso.net
    RubberTube.net
    ThunderGlyphSheet.net
    VolumeRendering.net
    SIMPLE/Autocolor.net

See Also

Color, ColorBar, AutoGrayScale, Display

[ OpenDX Home at IBM | OpenDX.org ]