Learn R Programming

oro.nifti (version 0.4.3)

readAFNI: readAFNI

Description

These functions read in the header information and multidimensional array from a binary file in AFNI format into a afni-class object.

Usage

readAFNI(fname, vol = NULL, verbose = FALSE, warn = -1, call = NULL)

Arguments

fname
is the file name of the AFNI file.
vol
vector of brick numbers to be read from file.
verbose
is a logical variable (default = FALSE) that allows text-based feedback during execution of the function.
warn
is a number to regularegulatete the display of warnings (default = -1). See options for more details.
call
keeps track of the current function call for use in the AFNI extension.

Value

  • object of class afni

Details

The readAFNI function utilizes internal methods readBin and readLines to efficiently extract information from the header and binary file(s). Compression is allowed on the BRIK file using gzip.

Current acceptable data types include [object Object],[object Object],[object Object]

References

AFNI http://afni.nimh.nih.gov/pub/dist/src/README.attributes

See Also

readANALYZE, readNIfTI

Examples

Run this code
## Taken from the AFNI Matlab Library
## http://afni.nimh.nih.gov/pub/dist/data/afni_matlab_data.tgz
afni.path <- system.file("afni", package="oro.nifti")
orig <- readAFNI(file.path(afni.path, "ARzs_CW_avvr.DEL+orig"))
image(orig, zlim=c(0.5,256), oma=rep(2,4))
orthographic(orig, zlim=c(0.5,256), oma=rep(2,4))
## Taken from the AFNI installation
TT <- readAFNI(file.path(afni.path, "TT_N27_EZ_LR+tlrc"))
image(TT, zlim=c(0.5,256), oma=rep(2,4))
orthographic(TT, zlim=c(0.5,256), oma=rep(2,4))

Run the code above in your browser using DataLab