plot-methods: plot an image

Description Usage Arguments Examples

Description

plot an image

Usage

1
2
3
4
5
6
7
8
9
## S4 method for signature 'NeuroSlice'
plot(x, cmap = gray(seq(0, 1, length.out = 255)),
  irange = range(x))

## S4 method for signature 'NeuroVol'
plot(x, cmap = gray(seq(0, 1, length.out = 255)),
  zlevels = unique(round(seq(1, dim(x)[3], length.out = 6))),
  irange = range(x), thresh = c(0, 0), alpha = 1, bgvol = NULL,
  bgcmap = gray(seq(0, 1, length.out = 255)))

Arguments

x

the object to display

cmap

a color map consisting of a vector of colors in hex format (e.g. gray(n=255))

irange

the intensity range indicating the low and high values of the color scale.

zlevels

the series of slice indices to display.

thresh

a 2-element vector indicating the lower and upper transparency thresholds.

bgvol

a background volume that serves as an image underlay (currently ignored).

Examples

1
2
3
4
5
6
7
dat <- matrix(rnorm(100*100), 100, 100)
slice <- NeuroSlice(dat, NeuroSpace(c(100,100)))
#plot(slice)

dat <- matrix(rnorm(100*100), 100, 100)
slice <- NeuroSlice(dat, NeuroSpace(c(100,100)))
#plot(slice)

bbuchsbaum/neuroim2 documentation built on Oct. 15, 2019, 2:55 p.m.