Learn R Programming

tractor.base (version 2.3.0)

data types: MriImage data types

Description

Convert a numeric type code to the image data type specifier used in MriImage objects, and back again.

Usage

getDataTypeByNiftiCode(code)
getNiftiCodeForDataType(datatype)

Arguments

code
A numeric value indicating the data type code required. Supported values in TractoR are 2 (8-bit unsigned integer), 4 (16-bit signed integer), 8 (32-bit signed integer), 16 (32-bit floating point), 64 (64-bit floating point), 256 (8-bit signed integer), 5
datatype
A list specifying a data type, with the elements described below.

Value

  • For getDataTypeByNiftiCode, a list with the following elements
  • typeAn Rstorage mode, either integer or double.
  • sizeThe number of bytes (not bits) per voxel in this data type.
  • isSignedLogical value indicating whether data values are signed.
  • For getNiftiCodeForDataType, a single number or NULL.

References

Please cite the following reference when using TractoR in your work:

J.D. Clayden, S. Muñoz Maniega, A.J. Storkey, M.D. King, M.E. Bastin & C.A. Clark (2011). TractoR: Magnetic resonance imaging and tractography with R. Journal of Statistical Software 44(8):1-18. http://www.jstatsoft.org/v44/i08/.

See Also

MriImage, and the NIfTI-1 standard (http://nifti.nimh.nih.gov/nifti-1).