read_afni: readAFNI

readAFNIR Documentation

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 regulate 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.

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

list("INT16")

DT SIGNED SHORT (16 bits per voxel)

list("FLOAT32")

DT FLOAT (32 bits per voxel)

list("COMPLEX128")

DT COMPLEX (128 bits per voxel)

Value

object of class afni

Author(s)

Karsten Tabelow karsten.tabelow@wias-berlin.de

References

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

See Also

readANALYZE, readNIfTI

Examples

## Not run: 
## 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))

## End(Not run)

oro.nifti documentation built on Aug. 10, 2022, 5:09 p.m.