nifti2.extension.size: Compute the size of a NIFTI v2 header extension in a file.

View source: R/nifti2_extensions.R

nifti2.extension.sizeR Documentation

Compute the size of a NIFTI v2 header extension in a file.

Description

A NIFTI v2 header extension occupies a multiple of 16 bytes in the file, because the payload is padded with NUL bytes. See nifti2.extension for details.

Usage

nifti2.extension.size(extension)

Arguments

extension

a NIFTI v2 header extension, a named list with entries 'ecode' and 'content', see nifti2.extension.

Value

integer, the size of the extension in bytes, as it is stored in the file. This includes the 8 bytes of meta data (the size and code fields) and the padding.

See Also

Other nifti2 extensions: nifti2.extension(), nifti2.extension.content(), nifti2.extension.text(), nifti2.get.extension()


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