newMriImageWithData(data, metadata)
newMriImageFromTemplate(image, ...)newMriImageByExtraction(image, dim, loc)
extractDataFromMriImage(image, dim, loc)
newMriImageByMasking(image, mask)
newMriImageByThresholding(image, level, defaultValue = 0)
newMriImageByTrimming(image, clearance = 4)
newMriImageAsShapeOverlay(type = c("cross", "block"), baseImage, ...)
generateImageDataForShape(type = c("cross", "block"), dim, background = 0,
centre = NA, width = NA)
newMriImageWithSimpleFunction(image, fun, ..., newDataType = NULL)
newMriImageWithBinaryFunction(image1, image2, fun, ..., newDataType = NULL)
MriImageMetadata object.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. newMriImageAsShapeOverlaylogical 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.NULL, then the data type is the same as the source image.newMriImageFromTemplate, further parameters to newMriImageMetadataFromTemplate. For newMriImageAsShapeOverlay, further parameters to generateImageMriImage 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 an MriImageMetadata object. newMriImageFromTemplate takes an existing image, with its voxel data, and creates a new image, possibly with modifications to the metadata.
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. 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