f.read.header: read ANALYZE or NIFTI header file

Description Usage Arguments Value See Also Examples

View source: R/niftiFMRI.R

Description

Reads the ANALYZE or NIFTI image format .hdr (or .nii) header file into a list. The format type is determined by first reading the magic field.

Usage

1

Arguments

file

The .hdr file to be read

Value

A list containing the information in the fields of the .hdr (.nii) file. See f.read.analyze.header of f.read.nifti.header to have the list of values.

See Also

f.read.analyze.header f.read.nifti.header

Examples

1
2
f.read.header(system.file("example.hdr", package="AnalyzeFMRI"))
f.read.header(system.file("example-nifti.hdr", package="AnalyzeFMRI"))

Example output

Loading required package: R.matlab
R.matlab v3.6.2 (2018-09-26) successfully loaded. See ?R.matlab for help.

Attaching package: 'R.matlab'

The following objects are masked from 'package:base':

    getOption, isOpen

Loading required package: fastICA
Loading required package: tcltk
Loading required package: tkrplot
Warning messages:
1: no DISPLAY variable so Tk is not available 
2: loading Rplot failed 
$file.name
[1] "/usr/lib/R/site-library/AnalyzeFMRI/example.img"

$swap
[1] 1

$sizeof.hdr
[1] 348

$data.type
[1] "signed short"

$db.name
[1] "audvis.4.2.mc.vol."

$extents
[1] 16384

$session.error
[1] 0

$regular
[1] "r"

$hkey.un0
[1] ""

$dim
[1]  4 64 64 21  1  0  0  0

$vox.units
[1] "mm"

$cal.units
[1] "pixels"

$unused1
[1] 0

$datatype
[1] 4

$bitpix
[1] 16

$dim.un0
[1] 0

$pixdim
[1] 4 4 4 6 0 0 0 0
attr(,"Csingle")
[1] TRUE

$vox.offset
[1] 0
attr(,"Csingle")
[1] TRUE

$funused1
[1] 1
attr(,"Csingle")
[1] TRUE

$funused2
[1] 0
attr(,"Csingle")
[1] TRUE

$funused3
[1] 0
attr(,"Csingle")
[1] TRUE

$cal.max
[1] 14553
attr(,"Csingle")
[1] TRUE

$cal.min
[1] 0
attr(,"Csingle")
[1] TRUE

$compressed
[1] 0
attr(,"Csingle")
[1] TRUE

$verified
[1] 0
attr(,"Csingle")
[1] TRUE

$glmax
[1] 14553

$glmin
[1] 0

$descrip
[1] "audvis.4.2.mc.vol.1.img"

$aux.file
[1] ""

$orient
[1] ""

$originator
[1] 0 0 0 0 0

$generated
[1] ""

$scannum
[1] ""

$patient.id
[1] ""

$exp.date
[1] ""

$exp.time
[1] ""

$hist.un0
[1] "LAS"

$views
[1] 0

$vols.added
[1] 0

$start.field
[1] 0

$field.skip
[1] 0

$omax
[1] 0

$omin
[1] 0

$smax
[1] 0

$smin
[1] 0

$file.name
[1] "/usr/lib/R/site-library/AnalyzeFMRI/example-nifti.img"

$swap
[1] 0

$sizeof.hdr
[1] 348

$data.type
[1] ""

$db.name
[1] ""

$extents
[1] 0

$session.error
[1] 0

$regular
[1] "r"

$dim.info
[1] ""

$dim
[1]  3 53 63 46  1  1  1  1

$intent.p1
[1] 0
attr(,"Csingle")
[1] TRUE

$intent.p2
[1] 0
attr(,"Csingle")
[1] TRUE

$intent.p3
[1] 0
attr(,"Csingle")
[1] TRUE

$intent.code
[1] 0

$datatype
[1] 2

$bitpix
[1] 8

$slice.start
[1] 0

$pixdim
[1] -1  3  3  3  0  0  0  0
attr(,"Csingle")
[1] TRUE

$vox.offset
[1] 0
attr(,"Csingle")
[1] TRUE

$scl.slope
[1] 1
attr(,"Csingle")
[1] TRUE

$scl.inter
[1] 0
attr(,"Csingle")
[1] TRUE

$slice.end
[1] 0

$slice.code
[1] ""

$xyzt.units
[1] "\n"

$cal.max
[1] 0
attr(,"Csingle")
[1] TRUE

$cal.min
[1] 0
attr(,"Csingle")
[1] TRUE

$slice.duration
[1] 0
attr(,"Csingle")
[1] TRUE

$toffset
[1] 0
attr(,"Csingle")
[1] TRUE

$glmax
[1] 0

$glmin
[1] 0

$descrip
[1] "spm_spm:resultant analysis mask"

$aux.file
[1] ""

$qform.code
[1] 2

$sform.code
[1] 2

$quatern.b
[1] 0
attr(,"Csingle")
[1] TRUE

$quatern.c
[1] 1
attr(,"Csingle")
[1] TRUE

$quatern.d
[1] 0
attr(,"Csingle")
[1] TRUE

$qoffset.x
[1] 78
attr(,"Csingle")
[1] TRUE

$qoffset.y
[1] -111
attr(,"Csingle")
[1] TRUE

$qoffset.z
[1] -51
attr(,"Csingle")
[1] TRUE

$srow.x
[1] -3  0  0 78
attr(,"Csingle")
[1] TRUE

$srow.y
[1]    0    3    0 -111
attr(,"Csingle")
[1] TRUE

$srow.z
[1]   0   0   3 -51
attr(,"Csingle")
[1] TRUE

$intent.name
[1] ""

$magic
[1] "ni1"

$extension
[1] 32 32 32 32

AnalyzeFMRI documentation built on Oct. 5, 2021, 5:06 p.m.