module NIFTI
NIFTI
is the main namespace for all Ruby NIfTI classes, constants and methods.
Constants
- CPU_ENDIAN
System (CPU) Endianness.
- CUSTOM_SL
Custom string used for (un)packing big endian signed long.
- CUSTOM_SS
Custom string used for (un)packing big endian signed short.
- HEADER_SIGNATURE
The
NIFTI
signature is hardcoded by bytes. This consists of arrays for each item in the signature, where item is the name of the item, item is the length in bytes of the item, and dim is the Format string to use in packing/unpacking the item.- NIFTI_DATATYPES
Take a
NIFTI
TypeCode and return datatype and bitpixFrom Jimmy Shen: Set bitpix according to datatype /*Acceptable values for datatype are*/
0 None (Unknown bit per voxel) % DT_NONE, DT_UNKNOWN 1 Binary (ubit1, bitpix=1) % DT_BINARY 2 Unsigned char (uchar or uint8, bitpix=8) % DT_UINT8, NIFTI_TYPE_UINT8 4 Signed short (int16, bitpix=16) % DT_INT16, NIFTI_TYPE_INT16 8 Signed integer (int32, bitpix=32) % DT_INT32, NIFTI_TYPE_INT32 16 Floating point (single or float32, bitpix=32) % DT_FLOAT32, NIFTI_TYPE_FLOAT32 32 Complex, 2 float32 (Use float32, bitpix=64) % DT_COMPLEX64, NIFTI_TYPE_COMPLEX64 64 Double precision (double or float64, bitpix=64) % DT_FLOAT64, NIFTI_TYPE_FLOAT64 128 uint8 RGB (Use uint8, bitpix=24) % DT_RGB24, NIFTI_TYPE_RGB24 256 Signed char (schar or int8, bitpix=8) % DT_INT8, NIFTI_TYPE_INT8 511 Single RGB (Use float32, bitpix=96) % DT_RGB96, NIFTI_TYPE_RGB96 512 Unsigned short (uint16, bitpix=16) % DT_UNINT16, NIFTI_TYPE_UNINT16 768 Unsigned integer (uint32, bitpix=32) % DT_UNINT32, NIFTI_TYPE_UNINT32
1024 Signed long long (int64, bitpix=64) % DT_INT64, NIFTI_TYPE_INT64 1280 Unsigned long long (uint64, bitpix=64) % DT_UINT64, NIFTI_TYPE_UINT64 1536 Long double, float128 (Unsupported, bitpix=128) % DT_FLOAT128, NIFTI_TYPE_FLOAT128 1792 Complex128, 2 float64 (Use float64, bitpix=128) % DT_COMPLEX128, NIFTI_TYPE_COMPLEX128 2048 Complex256, 2 float128 (Unsupported, bitpix=256) % DT_COMPLEX128, NIFTI_TYPE_COMPLEX128
- VERSION
Current Version of
NIFTI
- XFORM_CODES
Q/S Form Transform codes defined in the nifti header Reference: nifti.nimh.nih.gov/nifti-1/documentation/nifti1fields/nifti1fields_pages/qsform.html