Learn R Programming

neuroim (version 0.0.6)

writeVector: Generic function to write a 4D image vector to disk

Description

Generic function to write a 4D image vector to disk

Usage

writeVector(x, fileName, format, dataType)
"writeVector"(x, fileName)
"writeVector"(x, fileName, format)
"writeVector"(x, fileName, dataType)

Arguments

x
an image object, typically a BrainVector instance.
fileName
output file name.
format
file format string. Since "NIFTI" is the only currently supported format, this parameter can be safely ignored and omitted.
dataType
the numeric data type. If specified should be a character vector of: "BINARY", "UBYTE", "SHORT", "INT", "FLOAT", "DOUBLE". Otherwise output format will be inferred from R the datatype of the image.

Examples

Run this code

bvec <- BrainVector(array(0, c(10,10,10,10)), BrainSpace(c(10,10,10,10), c(1,1,1)))
## Not run: 
# writeVector(bvol, "out.nii")
# writeVector(bvol, "out.nii.gz")
# writeVector(bvec, "out.nii")
# writeVector(bvec, "out.nii.gz")
# ## End(Not run)

Run the code above in your browser using DataLab