visualisation {tractor.base} | R Documentation |
Visualise MriImage
objects.
createCombinedGraphics(images, modes, colourScales, axes = 1:3, sliceLoc = NULL, device = c("internal", "png"), alphaImages = NULL, prefix = "image", zoomFactor = 1, filter = "Mitchell") createProjectionGraphic(image, axis, device = c("internal", "png"), colourScale = 1, add = FALSE, file = NULL, zoomFactor = 1, filter = "Mitchell") createSliceGraphic(image, x = NA, y = NA, z = NA, device = c("internal", "png"), colourScale = 1, add = FALSE, file = NULL, zoomFactor = 1, filter = "Mitchell")
images |
A list of MriImage objects. |
image |
A single MriImage object. |
modes |
A character vector of the same length as images , each element being "slice" or "projection" (or abbreviations), indicating which type of visualisation should be applied to each image. |
colourScale, colourScales |
A single colour scale definition, or a list in the plural case. See Details. |
axis, axes |
A vector of axes along which slice/projection images should be created. 1 is left-right, 2 is anterior-posterior, 3 is superior-inferior. |
x, y, z |
Integer vectors, each of length 1. Exactly one of these must be specified to indicate the plane of interest. |
sliceLoc |
Like x , y and z , except that a point in 3 dimensions is specified. Must not be NA for each axis requested. |
device |
Either "internal" for display on the default graphics device, or "png" for creating PNG format image file(s). Abbreviations are fine. |
alphaImages |
A list of MriImage objects to be used as transparency masks. Must be the same length as images if not NULL . NULL values in the list indicate no mask. |
prefix, file |
A file name or prefix (to which "axial", "coronal" or "sagittal" will be added) to be used when device is "png". |
zoomFactor |
Factor by which to enlarge the image. Applies only when device is "png". |
filter |
Interpolation filter to be used by ImageMagick. |
add |
Overlay the graphic on a previous one. Used only when device is "internal". |
These functions create 2D visualisations of 3D images by slicing or maximum intensity projection.
Colour scales can be specified in any of three ways. Firstly, by a single number, representing a predefined colour scale. Currently valid values are 1 (greyscale, black background) and 2 (red to yellow heat scale, red background). Secondly, a single colour name can be given (see colours
); in this case the background will be black. This is useful for binary images. Thirdly and most flexibly, a list with two named elements can be given: colours
, a vector of colours representing the colour scale, perhaps created using rgb
; and background
, a single colour representing the background.
NB: When the device
option is set to "png", ImageMagick is required by these functions.
These functions are called for their side effects.
Jon Clayden