nifti2.write.extensions: Write the header extensions of a NIFTI v2 file.

View source: R/nifti2_extensions.R

nifti2.write.extensionsR Documentation

Write the header extensions of a NIFTI v2 file.

Description

Write the header extensions of a NIFTI v2 file.

Usage

nifti2.write.extensions(fh, extensions, endian = "little")

Arguments

fh

filehandle, a connection to a NIFTI v2 file, positioned at the first byte after the fixed-size header (i.e., where the extension flag bytes go).

extensions

list of header extensions, see nifti2.extension. An empty list writes the extension flag for 'no extensions present'.

endian

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

Value

integer, the number of bytes written (the extension flag bytes plus all extensions). The data must start at ⁠544 + <return value>⁠.


freesurferformats documentation built on Sept. 25, 2026, 1:07 a.m.