ILNumerics Ultimate VS

ColormapMap Method (Single, TupleSingle, Single, NullableVector4)

ILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
Map single value within colormap data range to color

[ILNumerics Visualization Engine]

Namespace:  ILNumerics.Drawing.Plotting
Assembly:  ILNumerics.Drawing (in ILNumerics.Drawing.dll) Version: ILNumerics Ultimate VS 4
Syntax

public Vector4 Map(
	float val,
	Tuple<float, float> minMaxRange = null,
	Nullable<Vector4> NaNColor = null
)

Parameters

val
Type: SystemSingle
Value to map, range of this colormap data range (i.e. column 0 in Data matrix)
minMaxRange (Optional)
Type: SystemTupleSingle, Single
[optional] If null: val is mapped to the colormap range; otherwise, val is mapped to the range given by minMaxRange.
NaNColor (Optional)
Type: SystemNullableVector4
[optional] Replacement value if no valid color could be mapped, default: transparent

Return Value

Type: Vector4
Color as Vector4 with mapped RGBA (XYZW) values, interpolated according to this colormap
Remarks

This function maps the single value given by val into a color computed from this colormap.

If val lays outside of the range defined by the colormap key points (commonly 0..1), the color returned is clamped to the colormap range.

If val is not a number (NaN) the color defined by NaNColor is returned. If no NaNColor was defined in the call to Map(InArraySingle, TupleSingle, Single, NullableVector4) the default NaN color as defined by DefaultNaNColor is returned.

[ILNumerics Visualization Engine]

See Also

Reference

Other Resources