Visualise MriImage
objects noninteractively using an R graphics
device. See viewImages
for an interactive alternative. These
functions create 2D visualisations of 3D images by slicing or maximum
intensity projection.
createSliceGraphic(image, x = NA, y = NA, z = NA,
device = c("internal", "png"), colourScale = 1, add = FALSE,
file = NULL, zoomFactor = 1, windowLimits = NULL)createProjectionGraphic(image, axis, device = c("internal", "png"),
colourScale = 1, add = FALSE, file = NULL, zoomFactor = 1,
windowLimits = NULL)
createContactSheetGraphic(image, axis, device = c("internal", "png"),
colourScale = 1, add = FALSE, file = NULL, zoomFactor = 1,
windowLimits = NULL, clearance = NULL, nColumns = NULL)
These functions are called for their side effects.
An MriImage
object.
Integer vectors, each of length 1. Exactly one of these must be specified to indicate the plane of interest.
Either "internal"
for display on the default graphics
device, or "png"
for creating PNG format image file(s).
Abbreviations are fine.
A colour scale definition, of the sort generated by
getColourScale
.
Overlay the graphic on a previous one. Used only when
device
is "internal"
.
A file name, to be used when device
is "png"
.
Factor by which to enlarge the image. Applies only when
device
is "png"
.
Numeric vector of length 2 giving the limits of the
colour scale, or NULL
for limits matching the range of the image
data. Passed as the zlim
argument to image
.
A vector of axes along which slice/projection images should be created. 1 is left-right, 2 is anterior-posterior, 3 is superior-inferior.
Number of voxels' clearance to leave around each slice
image in the contact sheet. Passed to trimMriImage
.
Number of slices per row in the contact sheet grid. If
NULL
, the function will aim for a square grid.
Jon Clayden
Please cite the following reference when using TractoR in your work:
J.D. Clayden, S. Muñoz Maniega, A.J. Storkey, M.D. King, M.E. Bastin & C.A. Clark (2011). TractoR: Magnetic resonance imaging and tractography with R. Journal of Statistical Software 44(8):1-18. https://www.jstatsoft.org/v44/i08/.
See viewImages
for an interactive alternative, and
getColourScale
for details of how colour scales are specified.
Also image
, which is used as the underlying plot function.