Learn R Programming

freesurferformats (version 1.1.0)

nifti.info.from.file: Read the header information and the data of a NIFTI file into a plain list.

Description

This is the file reading part of read.fs.volume.nii. The returned list uses plain entry names instead of the oro.nifti slot names, so that no code outside of this file depends on the name of an oro.nifti slot. The data scaling fields of the NIFTI header are applied, see the details in read.fs.volume.nii.

Usage

nifti.info.from.file(filepath)

Value

named list with the NIFTI header fields magic, datatype, bitpix, dim (the 8 entry NIFTI dim field, its first entry the number of used dimensions), glmin (the field used to store the true dimension for the FreeSurfer hack files, -1 for NIFTI v2 files, which do not have it), scl_slope, scl_inter, xyzt_units, pixdim (the 8 entry NIFTI pixdim field, its first entry qfac), sform_code, srow_x, srow_y, srow_z, qform_code, quatern_b, quatern_c, quatern_d, qoffset_x, qoffset_y, qoffset_z, and the data array in data.

Arguments

filepath

character string, the path to a NIFTI v1 or v2 file. The file extension may be omitted, see nifti.resolve.filepath.

See Also

nifti.info.from.oro.instance