Read NIfTI {dcemri} | R Documentation |
These functions read in the header information and multidimensional array from a binary file in NIfTI-1 format.
read.nifti.hdr(fname, onefile=TRUE, gzipped=TRUE, verbose=FALSE, warn=-1) read.nifti.img(fname, onefile=TRUE, gzipped=TRUE, verbose=FALSE, warn=-1, ignoreQform=FALSE, ignoreSform=FALSE)
fname |
Pathname of the NIfTI file(s). |
onefile |
Allows the scanning of single-file format (.nii) or dual-file format (.hdr and .img) NIfTI files. |
gzipped |
Allows the importation of compressed (.gz) files. |
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. |
ignoreQform |
is a logical variable (default = FALSE ) that
ignores any ‘qform’ infomration in the NIfTI header. |
ignoreSform |
is a logical variable (default = FALSE ) that
ignores any ‘sform’ infomration in the NIfTI header. |
Both functions utilize the internal readBin
and readChar
command to efficiently extract information from the binary file(s).
The types of data are limited to 1- and 2-byte integers, 4-byte floats
and 8-byte doubles.
read.nifti.hdr
returns a list containing all the fields from
the header file. read.nifti.img
returns a multidimensional
array depending on the fields obtained from the header file.
Brandon Whitcher
NIfTI-1 http://nifti.nimh.nih.gov/
read.analyze.hdr
, read.analyze.img
,
write.nifti.img