Learn R Programming

freesurferformats (version 1.1.0)

read.nifti.values: Read raw voxel values of a NIFTI v1/v2 or ANALYZE file from a connection.

Description

Read num_values voxel values of the data type described by the datatype and bitpix fields of a header, in the endianness of the file. This is the shared low level reading code of the NIFTI and ANALYZE readers.

Usage

read.nifti.values(fh, datatype, bitpix, num_values, endian)

Value

numeric or integer vector of length num_values, the raw values as they are stored in the file.

Arguments

fh

connection to read from, positioned at the first value.

datatype

integer, the datatype header field.

bitpix

integer, the bitpix header field.

num_values

integer, the number of values to read.

endian

character string, the endianness of the file, 'little' or 'big'.