R: Visualise MriImage objects

createSliceGraphic {tractor.base} | R Documentation

## Visualise MriImage objects

### Description

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.

### Usage

    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)

### Arguments

`image` | An `MriImage` object.
`x, y, z` | Integer vectors, each of length 1. Exactly one of these must be specified to indicate the plane of interest.
`device` | Either `"internal"` for display on the default graphics device, or `"png"` for creating PNG format image file(s). Abbreviations are fine.
`colourScale` | A colour scale definition, of the sort generated by `getColourScale`.
`add` | Overlay the graphic on a previous one. Used only when `device` is `"internal"`.
`file` | A file name, to be used when `device` is `"png"`.
`zoomFactor` | Factor by which to enlarge the image. Applies only when `device` is `"png"`.
`windowLimits` | 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`.
`axis` | A vector of axes along which slice/projection images should be created. 1 is left-right, 2 is anterior-posterior, 3 is superior-inferior.
`clearance` | Number of voxels' clearance to leave around each slice image in the contact sheet. Passed to `trimMriImage`.
`nColumns` | Number of slices per row in the contact sheet grid. If `NULL`, the function will aim for a square grid.

### Value

These functions are called for their side effects.

### Note

When the `device` option is set to `"png"`, the `"png"` and `"mmand"` packages are required by these functions.

### Author(s)

Jon Clayden

### References

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. http://www.jstatsoft.org/v44/i08/.

### See Also

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.

[Package tractor.base version 3.2.2 Index]