modified from oro.nifti:::image.nifti

# S3 method for class 'niftiImage'
image(
  x,
  BGimg = NULL,
  limits = 0,
  nrow = NULL,
  index = NULL,
  crop = TRUE,
  col = gray(0:64/64),
  colpos = pbj:::redyellow(64),
  colneg = pbj:::bluecyan(64),
  plane = c("axial", "coronal", "sagittal"),
  title = "",
  axes = FALSE,
  lo = TRUE,
  ...
)

Arguments

x

the Nifti object to display images of

BGimg

background image to use.

limits

A lower (and optionally upper length 2 vector) limits to apply to the image, defaults to 0

nrow

number of rows to display the slices as. NULL is default and it's a square shape determined by length of `index` argument.

index

Any selected image planes. defaults to NULL

crop

crop white space from image. Default is TRUE.

col

a vector of colors to use for scaled intensities defaults to a grey scale.

colpos

a vector of colors to use for positive values.

colneg

a vector of colors to use for negative values.

plane

the plane to display, can be axial, coronal or sagittal.

title

Title for figure drawn in outer margin with `mtext`.

axes

display axes, defaults to false

lo

Call layout to arrange images? Default is TRUE.

...

additional arguments passed to par

Examples

library(RNifti)
library(pain21)
pain = pain21()
templ = readNifti(pain$template)
# image(templ)
# image(templ, plane='coronal')