These functions read in the header information and
multidimensional array from a binary file in AFNI format into a
afni
-class object.
readAFNI(fname, vol = NULL, verbose = FALSE, warn = -1, call = NULL)
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 = |
warn | is a number to regulate the display of warnings (default
= -1). See |
call | keeps track of the current function call for use in the AFNI extension. |
object of class afni
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
DT SIGNED SHORT (16 bits per voxel)
DT FLOAT (32 bits per voxel)
DT COMPLEX (128 bits per voxel)
AFNI
http://afni.nimh.nih.gov/pub/dist/src/README.attributes
Karsten Tabelow karsten.tabelow@wias-berlin.de
if (FALSE) {
## 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))
}