Learn R Programming

freesurferformats (version 1.1.0)

analyzeheader.for.data: Create ANALYZE 7.5 header suitable for given data.

Description

Create ANALYZE 7.5 header suitable for given data.

Usage

analyzeheader.for.data(analyzedata, ...)

Value

an ANALYZE 7.5 header (see analyzeheader.template) in which the datatype, bitpix, dim, cal_min and cal_max fields have been set to values suitable for the given data. Feel free to change the other fields, e.g. the voxel sizes in pix_dim or the orient code.

Arguments

analyzedata

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

...

extra parameters passed on to analyzeheader.template, ignored in this function.

Examples

Run this code
analyzeheader <- analyzeheader.for.data(array(1:24, dim = c(4, 3, 2)))
analyzeheader$datatype

Run the code above in your browser using DataLab