color_scale_def Structure
The changes in color_scale_def are non-critical (unused),
for consistency only. |
Source: headers.h
| Byte | Size | Contents |
|---|---|---|
| 0 | UINT4 |
iflags:
|
| 4 | SINT4 | istart: Starting level |
| 8 | SINT4 | istep: Level step |
| 12 | SINT2 | icolcnt: Number of colors in scale |
| 14 | UINT2 | iset_and_scale: Color set number in low byte, color scale number in high byte. |
| 16 | UINT2[16] | ilevel_seams: Variable level starting values |
This structure appears at the end of the product_configuration structure. It
holds information configured into the product about how quantizing the data into color levels
for display.
Vaisala may remove this structure in future because IRIS can override this at display time. This is only used if the user selects Use Default Scale in the Color Scale Tool. The bit 11 is used to identify enumerated data type such as DB_HCLASS (DB_HCLASS2), requiring further information about the discrete data values.
To specify the color scale, use one of the following:
- Fixed scale has uniformly spaced numbers fully specified by a start and step value
- Variable scale is specified by a set of 16 individually controlled data seams
- Enumerated data in which each value has an discrete meaning, defined by the string data in enumeration_def structures, which can represent enumeration data as multiples of 14 classes
The iflags bits COLOR_SCALE_VARIABLE, overruled by ENUMERATED_DATA (relates to products using DB_HCLASS) indicate which mode is in effect.
In the first two cases, the number of colors can be 2 ... 16, and optionally zoomed or split to give up to 32 colors. True color representation is possible in IRIS. Bits 10 and 11 in iflags specify what to do with data off the end of the scale. The choices are:
- saturate at the end (use the last color)
- threshold (do not display)
A typical treatment of reflectivity is to saturate the high end of the scale (so as not to lose the strong features), and threshold at the low end (to inhibit display of very weak speckles).
The number of main colors and labels in the legend is set by icolcnt. To select which subset of colors is used for the scale, fill in the low byte of iset_and_scale. The upper byte is not used in the product header.
For fixed spacing, set the istart and istep to the start and step values desired. These values are integers which are 10 times the physical units as discussed in the color_setup utility chapter of the IRIS Utilities Manual. The labels of istart, istart+istep, istart+2*istep, and so on appear on the right side of the IRIS legend. Note that:
- Width assumes that the starting value is 0.
- Velocity assumes that the middle of the scale is at 0.
If the velocity step is set to 0 it means, the spacing automatically scales to fit the Nyquist velocity.
For variable spacing (bit 8 ON), the numbers in the array ilevel_seams control the starting values for each of the colors. The first seam is the bottom of the first color. The top of the 16th color is computed by adding the step between the 15th and 16th seam to the 16th seam. These seams are data values, using the 16-bit versions of the data. For shear and height data, for which there is no 16-bit version, the 8-bit version is used.
Enumerated data (bit 12 ON) can be treated as other data types, that is either with fixed spacing or variable spacing.
