analyzeheader.template: Create a template ANALYZE 7.5 header. You will have to adapt...

View source: R/read_analyze.R

analyzeheader.templateR Documentation

Create a template ANALYZE 7.5 header. You will have to adapt it for your use case.

Description

This function returns a valid ANALYZE 7.5 header with all fields present, filled with the default values of the format. You will most likely have to adapt at least the dim, datatype, bitpix and pix_dim fields to your data, which is what analyzeheader.for.data does for you.

Usage

analyzeheader.template()

Value

named list, the ANALYZE 7.5 header. The fields endian, magic, header_format and spm_origin are not part of the ANALYZE 7.5 header: endian and magic describe how the file is stored, header_format tells which variant of the 348 byte header this is ('analyze' or 'nifti1_pair'), and spm_origin is the interpretation of the originator field that the SPM software uses.

Note

The fields spm_origin and magic are derived when a file is read, they are documented in read.analyze.header.

See Also

analyzeheader.for.data, read.analyze.header, write.analyze

Examples

analyzeheader <- analyzeheader.template()
analyzeheader$dim <- c(3L, 4L, 3L, 2L, 1L, 1L, 1L, 1L)
analyzeheader$pix_dim <- c(1., 1., 1., 1., 0., 0., 0., 0.)


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