Learn R Programming

cudaBayesreg (version 0.3-16)

read.fmrislice: Read fMRI data

Description

read.fmrislice reads pre-filtered fMRI data, mask data, and the design matrix to be used in fMRI data processing.

Usage

read.fmrislice(fbase=NULL, slice=NULL, swap=FALSE)

Arguments

fbase
If fbase is left unspecified (default NULL), then user datasets need to be provided as input. Otherwise, fbase indicates the dataset prefix of one of the two demo fMRI datasets to use. Three data files are required as input. User specified data files must have the names generated by the FSL/FEAT pre-processing tool, namely ‘filtered_func_data.nii.gz’, ‘mask.nii.gz’, and ‘design.mat’. ‘filtered_func_data.nii.gz’ specifies the dataset to be analyzed, ‘mask.nii.gz’ specifies the dataset to be used as mask. ‘design.mat’ specifies the dataset to be used as design matrix. Typically, these datasets are obtained using the FSL/FEAT pre-processing tool, or other similar tool. In cudaBayesreg, versions 10+, read.fmrislice uses the ‘design.mat’ format from FSL/FEAT. The prefix fbase applies to the demo data files provided in the complementary package cudaBayesregData: ‘{fbase}_filtered_func.nii.gz’, ‘{fbase}_mask.nii.gz’, and ‘{fbase}_design.mat’. Two test datasets are included in the package: one with prefix fmri, the other with prefix swrfM. The prefix swrfM is used in the random effects example. See also read.Zsegslice for user-defined segmented masks.
slice
the number of the slice to use. If a slice number is not specified a central slice from the provided dataset (mid-brain, in general) is assumed (default NULL).
swap
logical variable (default = FALSE) for choosing the right/left data display convention consistent with FSLVIEW.

Value

fbase
dataset prefix of the dataset used in the analysis
slice
slice number
niislicets
slice data at all timepoints
mask
slice mask
X
full design matrix
nvar
number of regression variables
nobs
number of observations
swap
relative orientation used in the data setup

Details

The FSL/FEAT Analysis tool may be used to generate the prefiltered fMRI data (niislicets), the mask (mask), and the design matrix (dsgn) required as data input. The FSL-design file design.mat is simply a ASCII textfile with the fields /NumWaves, /NumPoints, /PPheights, and /Matrix. Therefore, it may easily edited, if required, to prepare user specific design matrices without the FSL/FEAT tool. The package oro.nifti is required for reading gzipped NIFTI files.

References

Adelino Ferreira da Silva (2011). cudaBayesregData: Data sets for the examples used in the package cudaBayesreg, R package version 0.3-10. URL http://CRAN.R-project.org/package=cudaBayesregData.

FSL/FEAT Analysis tool, FMRIB Software Library (FSL). URL www.fmrib.ox.ac.uk/fsl.

Brandon Whitcher, Volker Schmid and Andrew Thornton (2011). oro.nifti: Rigorous - NIfTI Input / Output, R package version 0.2.5. URL http://CRAN.R-project.org/package=oro.nifti.

See Also

cudaMultireg.slice read.Zsegslice premask

Examples

Run this code
## Not run: 
# slicedata <- read.fmrislice(fbase="fmri", slice=3)
# print(str(slicedata))
# ## End(Not run)

Run the code above in your browser using DataLab