R/im3d.R
Method to plot spatially calibrated image arrays
# S3 method for im3d image(x, xlim = NULL, ylim = NULL, zlim = NULL, plotdims = NULL, flipdims = "y", filled.contour = FALSE, asp = 1, axes = FALSE, xlab = NULL, ylab = NULL, nlevels = 20, levels = pretty(zlim, nlevels + 1), color.palette = colorRampPalette(c("navy", "cyan", "yellow", "red")), col = color.palette(length(levels) - 1), useRaster = NULL, ...)
x | The im3d object containing the data to be plotted ( |
---|---|
xlim, ylim | ranges for the plotted |
zlim | the minimum and maximum |
plotdims | Which dimensions of 3D |
flipdims | Which dimensions to flip (character vector). Defaults to flipping y. |
filled.contour | Whether to use a |
asp | Whether to have a a square aspect ratio (logical, default:
|
axes | Whether to plot axes (default: |
xlab, ylab | each a character string giving the labels for the x and y
axis. Default to the ‘call names’ of |
nlevels | The number of colour levels in z |
levels | The levels at which to break z values |
color.palette | The colour palette from which |
col | a list of colors such as that generated by |
useRaster | Whether to use |
… | graphical parameters for |
A list
with elements:
zlim The z (intensity limits)
nlevels.actual The actual number of plotted levels
nlevels.orig The requested number of plotted levels
levels The chosen levels
colors A character vector of colours
# NOT RUN { LHMask=read.im3d(system.file('tests/testthat/testdata/nrrd/LHMask.nrrd',package='nat')) image(imslice(LHMask,10), asp=TRUE) # useRaster is appreciably quicker in most cases image(imslice(LHMask,10), asp=TRUE, useRaster=TRUE) # }