newMriImageWithData(data, templateImage = nilObject(), imageDims = NA,
voxelDims = NA, voxelDimUnits = NA, origin = NA, tags = NA)newMriImageByExtraction(image, dim, loc)
extractDataFromMriImage(image, dim, loc)
newMriImageByMasking(image, mask)
newMriImageByThresholding(image, level, defaultValue = 0)
newMriImageByTrimming(image, clearance = 4)
newMriImageByReordering(image)
newMriImageAsShapeOverlay(type = c("cross", "block"), baseImage, ...)
generateImageDataForShape(type = c("cross", "block"), dim, background = 0,
centre = NA, width = NA)
newMriImageWithSimpleFunction(image, fun, ...)
newMriImageWithBinaryFunction(image1, image2, fun, ...)
MriImage
object, to be used as a metadata template.MriImage
objects.newMriImageByExtraction
, the dimension and location along that dimension for which data should be extracted. For generateImageDataForShape
, dim
is the dimensions of the image. newMriImageAsShapeOverlay
logical
indicating which voxels are in the mask. Must have the same dimensions as the image."block"
is a cubic region of the image; a "cross"
is the central line of the cube in each dimension.MriImage
to use as a base for the overlay.newMriImageAsShapeOverlay
, further parameters to generateImageDataForShape
. And for newMriImageWithSimpleFunction
and newMriImageWithBinaryFunction
, further parameters to fun
.MriImage
object.MriImage
objects to create a new MriImage
object. newMriImageWithData
is the basic function for creating an object from its constituents: an array of voxel values and some metadata (and/or a template image).
newMriImageByExtraction
reduces the dimensionality of the source image by one, by extracting a single ``line'' of data along one dimension. (An array, rather than an MriImage
object, is returned by extractDataFromMriImage
.) newMriImageByMasking
modifies the data by masking out unwanted voxels, and newMriImageByThresholding
by thresholding. newMriImageByTrimming
trims empty space from the edges of an image, reducing the dimensions of the image and thus avoiding the storage of lots of zeroes. newMriImageByReordering
reorders the image data (and corresponding metadata) to the LAS convention, an operation which is usually performed when an image is read from file. newMriImageAsShapeOverlay
creates an image which contains a simple shape. newMriImageWithSimpleFunction
and newMriImageWithBinaryFunction
modify the image data by applying an arbitrary function to it. Any function that can be applied to numeric arrays, and expects one or two arguments, respectively, is suitable for fun
.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.
MriImage