84_shaders: Single Channel Shaders

Description Usage Arguments Value See Also Examples

Description

These functions return functions (or a list of functions).
The resulting functions, map a matrix of numeric values to a character matrix of colors.

They are designed for rendering single channel images, and also for rendering multiple channels, separately.
(In contrast to rendering a multichannel image, as a single raster image).

Usage

1
2
3
4
5
6
7
vt3.linear.shader (col0="black", col1="white", min=0, max=1, reverse=FALSE)

vt3.rgb.shaders ()
vt3.hcl.shaders ()
vt3.hsv.shaders ()

vt3.hue.shader (hmin=0, hmax=360, ..., c=50, l=50, na.col="white")

Arguments

hmin, hmax

Single numeric values, the min and max hue values.

c, l

Single numeric values, the C and L values in HCL color space.

na.col

The color returned for NA values.

col0, col1

Strings, the lower and upper colors.

min, max

The min and max values to interpolate between.

reverse

Logical, if true, it's equivalent to swapping min and max.

...

Ignored.

Value

vt3.linear.shader returns a function.

The others return a list of four functions.

See Also

as.raster.SImage, as.raster.MImage

Examples

1
2
colf <- vt3.linear.shader ()
colf (c (0.33, 0.67) )

vectools documentation built on June 7, 2021, 9:08 a.m.