Learn R Programming

vectools (version 0.3.0)

34_as_raster_methods: As Raster Methods

Description

Create standard raster objects from RImage (SImage and MImage) objects, from this package.

Usage

as.raster.SImage (x, …, optfit=FALSE,
    colf = vt3.linear.shader (reverse=invert),
    invert=TRUE)

as.raster.MImage (x, …, which, invert.gs=TRUE)

Arguments

x

An RImage object.

which

Integer, which channel. If missing, all channels are used.

invert, invert.gs

Logical, if true, reverse the colors. In MImage, ignored, except for GS and GS-A (one and two channel images), or single-channel images via the which arg.

optfit

Logical, if true, fit colors to a reduced interval (min value to max value), increasing the visible color variation.

colf

A function that maps a numeric matrix to a character matrix of R colors. This includes a shader function from this package.

Ignored.

See Also

RImage

Refer to above link for example.