nifti.datadim.from.dimfield: Compute data dimensions from the 'dim' field of the NIFTI (v1...

View source: R/nifti_common.R

nifti.datadim.from.dimfieldR Documentation

Compute data dimensions from the 'dim' field of the NIFTI (v1 or v2) header.

Description

Compute data dimensions from the 'dim' field of the NIFTI (v1 or v2) header.

Usage

nifti.datadim.from.dimfield(dimfield)

Arguments

dimfield

integer vector of length 8, the 'dim' field of a NIFTI v1 or v2 header, as returned by read.nifti2.header or read.nifti1.header.

Value

integer vector of length <= 7. The lengths of the used data dimensions. The 'dim' field always has length 8, and the first entry is the number of actually used dimensions. The return value is constructed by stripping the first field and returning the used fields.

See Also

Other NIFTI helper functions: nifti.datadim.to.dimfield()

Examples

   nifti.datadim.from.dimfield(c(3, 256, 256, 256, 1, 1, 1, 1));


freesurferformats documentation built on May 29, 2024, 5:29 a.m.