Create NIFTI v2 header suitable for given data.

ni2header.for.data(niidata)

Arguments

niidata

array of numeric (integer or double) data, can have up to 7 dimensions.

Value

a NIFTI v2 header (see ni2header.template) in which the datatype, bitpix, dim and dim_raw fields have been set to values suitable for the given data. Feel free to change the other fields.