Learn R Programming

oro.nifti (version 0.1.4)

readANALYZE: readANALYZE

Description

These functions read in the header information and multi-dimensional array from a binary file in Analyze 7.5 format.

Usage

readANALYZE(fname, verbose = FALSE, warn = -1)
read.analyze.content(fname, gzipped = TRUE, verbose = FALSE, warn = -1)

Arguments

fname
Pathname of the Analyze pair of files .img and .hdr without the suffix.
gzipped
Allows the import/export of compressed (.gz) files (default = TRUE).
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.

Value

  • An object of class anlz is produced.

Details

The internal functions readBin and rawToChar are utilized in order to efficiently extract information from a binary file. The types of data are limited to 1- and 2-byte integers, 4-byte floats and 8-byte doubles.

References

ANALYZE 7.5 http://www.mayo.edu/bir/PDF/ANALYZE75.pdf

See Also

readNIfTI

Examples

Run this code
## 27 scans of Colin Holmes (MNI) brain co-registered and averaged
URL <- "http://imaging.mrc-cbu.cam.ac.uk/downloads/Colin/colin_1mm.tgz"
urlpath <- system.file("anlz", package="oro.nifti")
urlfile <- file.path(urlpath, "colin_1mm.tgz")
download.file(URL, dest=urlfile, quiet=TRUE)
untar(urlfile, exdir=urlpath)
urlpath <- system.file("anlz", package="oro.nifti")
colin <- readANALYZE(file.path(urlpath, "colin_1mm"))
image(colin, oma=rep(2,4))
orthographic(colin, oma=rep(2,4))

Run the code above in your browser using DataLab