read.NIFTI {fmri} | R Documentation |
I/O Functions
Description
Read fMRI data from NIFTI file(s).
Usage
read.NIFTI(filename, level = 0.75, mask=NULL, setmask=TRUE)
Arguments
filename |
name of the NIfTI file |
level |
Quantile level defining the mask |
mask |
array or nifti-object containing the mask. If set this replaces the mask defined by argument level. |
setmask |
Logical (default |
Details
This function reads fMRI data files in NIfTI format.
The filename can be given with or without extension. If extension is not included, the function searches for the ".nii" file and then for the "hdr/img" pair.
Value
Object of class "fmridata" with the following list entries:
ttt |
raw vector (numeric size 4) containing the four dimensional data cube (the first three dimensions are voxel dimensions, the fourth dimension denotes the time). |
header |
header information of the data |
format |
data source. string "NIFTI" |
delta |
voxel size in mm |
origin |
position of the datacube origin |
orient |
data orientation code |
dim |
dimension of the datacube |
weights |
weights vector coding the relative voxel sizes in x, y, z-direction |
mask |
head mask |
Author(s)
Karsten Tabelow tabelow@wias-berlin.de
References
Polzehl, J. and Tabelow, K. (2007) fmri: A Package for Analyzing fmri Data, R News, 7:13-17 .
See Also
Examples
## Not run: analyze <- read.NIFTI("niftifile.nii")