Convert NIfTI Codes

Description

Codes that appear in the NIfTI-1 header are mapped to meaningful chartacter strings.

Usage

1
2
3
4
5
6
convert.datatype(datatype.code = NULL)
convert.bitpix(bitpix = NULL)
convert.intent(intent.code = NULL)
convert.form(form.code)
convert.units(units, inverse = FALSE)
convert.slice(slice.code)

Arguments

datatype.code

defines data type.

bitpix

is the bit-per-pixel code.

intent.code

is the NIfTI intent code.

form.code

is the (x,y,z) coordinate system.

units

is the units of pixdim[1..4].

inverse

is a logical value that denotes the direction of unit conversion.

slice.code

is the slice timing order.

Details

switch statements are used to map a numeric code to the appropriate string.

Value

A character string.

Author(s)

Brandon Whitcher bwhitcher@gmail.com

References

Neuroimaging Informatics Technology Initiative (NIfTI)
http://nifti.nimh.nih.gov/

See Also

convert.datatype.anlz, convert.orient.anlz

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## No arguments produces a list structure
## Use the abbreviation to obtain the code
convert.datatype()$INT16
## Use the code directly to obtain the abbreviation
convert.datatype(4)
## No arguments produces a list structure
## Use the abbreviation to obtain the code
convert.bitpix()$INT16
## No arguments produces a list structure
## Use the abbreviation to obtain the code
convert.intent()$Estimate
## Use the code directly to obtain the abbreviation
convert.intent(1001)
## 4 = MNI_152
convert.form(4)
## 2 = mm
convert.units(2)
## 8 = sec
convert.units(8)
## 0 = Unknown
convert.slice(0)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.