write.nifti2: Write header and data to a file in NIFTI v2 format.

View source: R/write_nifti2.R

write.nifti2R Documentation

Write header and data to a file in NIFTI v2 format.

Description

Write header and data to a file in NIFTI v2 format.

Usage

write.nifti2(filepath, niidata, niiheader = NULL)

Arguments

filepath

the file to write. The extension should be '.nii' or '.nii.gz'.

niidata

array of numeric or integer data, with up to 7 dimensions. Will be written to the file with the datatype and bitpix specified in the 'niiheader' argument.

niiheader

an optional NIFTI v2 header that is suitable for the passed 'niidata'. If not given, one will be generated with ni2header.for.data.

See Also

Other nifti2 writers: write.fs.morph.ni2()


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