asMriImage {tractor.base} | R Documentation |
Creating MriImage objects from data
Description
Functions for creating MriImage objects from data, including other images.
All of these functions use data from arrays or MriImage
objects to
create a new MriImage
object. asMriImage
is the basic fucntion
for creating an object from its constituents: an array of voxel values and
some metadata (and/or a template image).
Usage
asMriImage(data, templateImage = nilObject(), imageDims = NA,
voxelDims = NA, voxelDimUnits = NA, origin = NA, tags = NA,
reordered = NA)
extractMriImage(image, dim, loc)
trimMriImage(image, clearance = 4, indices = NULL)
reorderMriImage(image)
Arguments
data |
An array of pixel/voxel data. |
templateImage |
An optional |
imageDims , voxelDims , voxelDimUnits , origin , tags , reordered |
Metadata for
the new image object. These values override any from the metadata object
or data array. See |
image |
An |
dim , loc |
The dimension and location along that dimension for which data should be extracted. |
clearance |
The number of voxels' clearance left around a trimmed image. |
indices |
A list of indices to keep along each dimension. Determined
from the specified |
Details
extractMriImage
reduces the dimensionality of the source image by
one, by extracting a single “slice” of data along one dimension.
trimMriImage
trims empty space from the edges of an image, reducing
the dimensions of the image and thus avoiding the storage of lots of zeroes.
reorderMriImage
reorders the image data (and corresponding metadata)
to the LAS convention, an operation which is usually performed when an
image is read from file.
Value
An MriImage
object.
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. doi:10.18637/jss.v044.i08.