VTK
Classes | Macros | Typedefs | Variables
NIFTI Datatype Aliases

aliases for the nifti1 datatype codes More...

Classes

struct  nifti_2_header
 Data structure defining the fields in the nifti2 header. This binary header should be found at the beginning of a valid NIFTI-2 header file. More...
 

Macros

#define NIFTI_TYPE_UINT8   2
 
#define NIFTI_TYPE_INT16   4
 
#define NIFTI_TYPE_INT32   8
 
#define NIFTI_TYPE_FLOAT32   16
 
#define NIFTI_TYPE_COMPLEX64   32
 
#define NIFTI_TYPE_FLOAT64   64
 
#define NIFTI_TYPE_RGB24   128
 
#define NIFTI_TYPE_INT8   256
 
#define NIFTI_TYPE_UINT16   512
 
#define NIFTI_TYPE_UINT32   768
 
#define NIFTI_TYPE_INT64   1024
 
#define NIFTI_TYPE_UINT64   1280
 
#define NIFTI_TYPE_FLOAT128   1536
 
#define NIFTI_TYPE_COMPLEX128   1792
 
#define NIFTI_TYPE_COMPLEX256   2048
 
#define NIFTI_TYPE_RGBA32   2304
 
#define NIFTI_VERSION(h)
 
#define NIFTI_ONEFILE(h)   ( (h).magic[1] == '+' )
 
#define NIFTI_NEEDS_SWAP(h)   ( (h).dim[0] < 0 || (h).dim[0] > 7 )
 

Typedefs

typedef struct nifti_2_header nifti_2_header
 

Variables

int nifti_1_header::sizeof_hdr
 
char nifti_1_header::data_type [10]
 
char nifti_1_header::db_name [18]
 
int nifti_1_header::extents
 
short nifti_1_header::session_error
 
char nifti_1_header::regular
 
char nifti_1_header::dim_info
 
short nifti_1_header::dim [8]
 
float nifti_1_header::intent_p1
 
float nifti_1_header::intent_p2
 
float nifti_1_header::intent_p3
 
short nifti_1_header::intent_code
 
short nifti_1_header::datatype
 
short nifti_1_header::bitpix
 
short nifti_1_header::slice_start
 
float nifti_1_header::pixdim [8]
 
float nifti_1_header::vox_offset
 
float nifti_1_header::scl_slope
 
float nifti_1_header::scl_inter
 
short nifti_1_header::slice_end
 
char nifti_1_header::slice_code
 
char nifti_1_header::xyzt_units
 
float nifti_1_header::cal_max
 
float nifti_1_header::cal_min
 
float nifti_1_header::slice_duration
 
float nifti_1_header::toffset
 
int nifti_1_header::glmax
 
int nifti_1_header::glmin
 
char nifti_1_header::descrip [80]
 
char nifti_1_header::aux_file [24]
 
short nifti_1_header::qform_code
 
short nifti_1_header::sform_code
 
float nifti_1_header::quatern_b
 
float nifti_1_header::quatern_c
 
float nifti_1_header::quatern_d
 
float nifti_1_header::qoffset_x
 
float nifti_1_header::qoffset_y
 
float nifti_1_header::qoffset_z
 
float nifti_1_header::srow_x [4]
 
float nifti_1_header::srow_y [4]
 
float nifti_1_header::srow_z [4]
 
char nifti_1_header::intent_name [16]
 
char nifti_1_header::magic [4]
 
int nifti_2_header::sizeof_hdr
 
char nifti_2_header::magic [8]
 
short nifti_2_header::datatype
 
short nifti_2_header::bitpix
 
long long nifti_2_header::dim [8]
 
double nifti_2_header::intent_p1
 
double nifti_2_header::intent_p2
 
double nifti_2_header::intent_p3
 
double nifti_2_header::pixdim [8]
 
long long nifti_2_header::vox_offset
 
double nifti_2_header::scl_slope
 
double nifti_2_header::scl_inter
 
double nifti_2_header::cal_max
 
double nifti_2_header::cal_min
 
double nifti_2_header::slice_duration
 
double nifti_2_header::toffset
 
long long nifti_2_header::slice_start
 
long long nifti_2_header::slice_end
 
char nifti_2_header::descrip [80]
 
char nifti_2_header::aux_file [24]
 
int nifti_2_header::qform_code
 
int nifti_2_header::sform_code
 
double nifti_2_header::quatern_b
 
double nifti_2_header::quatern_c
 
double nifti_2_header::quatern_d
 
double nifti_2_header::qoffset_x
 
double nifti_2_header::qoffset_y
 
double nifti_2_header::qoffset_z
 
double nifti_2_header::srow_x [4]
 
double nifti_2_header::srow_y [4]
 
double nifti_2_header::srow_z [4]
 
int nifti_2_header::slice_code
 
int nifti_2_header::xyzt_units
 
int nifti_2_header::intent_code
 
char nifti_2_header::intent_name [16]
 
char nifti_2_header::dim_info
 
char nifti_2_header::unused_str [15]
 

Detailed Description

aliases for the nifti1 datatype codes

Macro Definition Documentation

◆ NIFTI_TYPE_UINT8

#define NIFTI_TYPE_UINT8   2

unsigned char.

Definition at line 108 of file vtkNIFTIImagePrivate.h.

◆ NIFTI_TYPE_INT16

#define NIFTI_TYPE_INT16   4

signed short.

Definition at line 110 of file vtkNIFTIImagePrivate.h.

◆ NIFTI_TYPE_INT32

#define NIFTI_TYPE_INT32   8

signed int.

Definition at line 112 of file vtkNIFTIImagePrivate.h.

◆ NIFTI_TYPE_FLOAT32

#define NIFTI_TYPE_FLOAT32   16

32 bit float.

Definition at line 114 of file vtkNIFTIImagePrivate.h.

◆ NIFTI_TYPE_COMPLEX64

#define NIFTI_TYPE_COMPLEX64   32

64 bit complex = 2 32 bit floats.

Definition at line 116 of file vtkNIFTIImagePrivate.h.

◆ NIFTI_TYPE_FLOAT64

#define NIFTI_TYPE_FLOAT64   64

64 bit float = double.

Definition at line 118 of file vtkNIFTIImagePrivate.h.

◆ NIFTI_TYPE_RGB24

#define NIFTI_TYPE_RGB24   128

3 8 bit bytes.

Definition at line 120 of file vtkNIFTIImagePrivate.h.

◆ NIFTI_TYPE_INT8

#define NIFTI_TYPE_INT8   256

signed char.

Definition at line 122 of file vtkNIFTIImagePrivate.h.

◆ NIFTI_TYPE_UINT16

#define NIFTI_TYPE_UINT16   512

unsigned short.

Definition at line 124 of file vtkNIFTIImagePrivate.h.

◆ NIFTI_TYPE_UINT32

#define NIFTI_TYPE_UINT32   768

unsigned int.

Definition at line 126 of file vtkNIFTIImagePrivate.h.

◆ NIFTI_TYPE_INT64

#define NIFTI_TYPE_INT64   1024

signed long long.

Definition at line 128 of file vtkNIFTIImagePrivate.h.

◆ NIFTI_TYPE_UINT64

#define NIFTI_TYPE_UINT64   1280

unsigned long long.

Definition at line 130 of file vtkNIFTIImagePrivate.h.

◆ NIFTI_TYPE_FLOAT128

#define NIFTI_TYPE_FLOAT128   1536

128 bit float = long double.

Definition at line 132 of file vtkNIFTIImagePrivate.h.

◆ NIFTI_TYPE_COMPLEX128

#define NIFTI_TYPE_COMPLEX128   1792

128 bit complex = 2 64 bit floats.

Definition at line 134 of file vtkNIFTIImagePrivate.h.

◆ NIFTI_TYPE_COMPLEX256

#define NIFTI_TYPE_COMPLEX256   2048

256 bit complex = 2 128 bit floats

Definition at line 136 of file vtkNIFTIImagePrivate.h.

◆ NIFTI_TYPE_RGBA32

#define NIFTI_TYPE_RGBA32   2304

4 8 bit bytes.

Definition at line 138 of file vtkNIFTIImagePrivate.h.

◆ NIFTI_VERSION

#define NIFTI_VERSION (   h)
Value:
( ( (h).magic[0]=='n' && (h).magic[3]=='\0' && \
( (h).magic[1]=='i' || (h).magic[1]=='+' ) && \
( (h).magic[2]>='1' && (h).magic[2]<='9' ) ) \
? (h).magic[2]-'0' : 0 )

Given a nifti_1_header struct, check if it has a good magic number. Returns NIFTI version number (1..9) if magic is good, 0 if it is not.

Definition at line 150 of file vtkNIFTIImagePrivate.h.

◆ NIFTI_ONEFILE

#define NIFTI_ONEFILE (   h)    ( (h).magic[1] == '+' )

Check if a nifti_1_header struct says if the data is stored in the same file or in a separate file. Returns 1 if the data is in the same file as the header, 0 if it is not.

Definition at line 161 of file vtkNIFTIImagePrivate.h.

◆ NIFTI_NEEDS_SWAP

#define NIFTI_NEEDS_SWAP (   h)    ( (h).dim[0] < 0 || (h).dim[0] > 7 )

Check if a nifti_1_header struct needs to be byte swapped. Returns 1 if it needs to be swapped, 0 if it does not.

Definition at line 167 of file vtkNIFTIImagePrivate.h.

Typedef Documentation

◆ nifti_2_header

Definition at line 262 of file vtkNIFTIImagePrivate.h.

Variable Documentation

◆ sizeof_hdr [1/2]

int nifti_1_header::sizeof_hdr

MUST be 348

Definition at line 38 of file vtkNIFTIImagePrivate.h.

◆ data_type

char nifti_1_header::data_type[10]

++UNUSED++

Definition at line 39 of file vtkNIFTIImagePrivate.h.

◆ db_name

char nifti_1_header::db_name[18]

++UNUSED++

Definition at line 40 of file vtkNIFTIImagePrivate.h.

◆ extents

int nifti_1_header::extents

++UNUSED++

Definition at line 41 of file vtkNIFTIImagePrivate.h.

◆ session_error

short nifti_1_header::session_error

++UNUSED++

Definition at line 42 of file vtkNIFTIImagePrivate.h.

◆ regular

char nifti_1_header::regular

++UNUSED++

Definition at line 43 of file vtkNIFTIImagePrivate.h.

◆ dim_info [1/2]

char nifti_1_header::dim_info

MRI slice ordering.

Definition at line 44 of file vtkNIFTIImagePrivate.h.

◆ dim [1/2]

short nifti_1_header::dim[8]

Data array dimensions.

Definition at line 45 of file vtkNIFTIImagePrivate.h.

◆ intent_p1 [1/2]

float nifti_1_header::intent_p1

1st intent parameter.

Definition at line 46 of file vtkNIFTIImagePrivate.h.

◆ intent_p2 [1/2]

float nifti_1_header::intent_p2

2nd intent parameter.

Definition at line 47 of file vtkNIFTIImagePrivate.h.

◆ intent_p3 [1/2]

float nifti_1_header::intent_p3

3rd intent parameter.

Definition at line 48 of file vtkNIFTIImagePrivate.h.

◆ intent_code [1/2]

short nifti_1_header::intent_code

NIFTI_INTENT_* code.

Definition at line 49 of file vtkNIFTIImagePrivate.h.

◆ datatype [1/2]

short nifti_1_header::datatype

Defines data type!

Definition at line 50 of file vtkNIFTIImagePrivate.h.

◆ bitpix [1/2]

short nifti_1_header::bitpix

Number bits/voxel.

Definition at line 51 of file vtkNIFTIImagePrivate.h.

◆ slice_start [1/2]

short nifti_1_header::slice_start

First slice index.

Definition at line 52 of file vtkNIFTIImagePrivate.h.

◆ pixdim [1/2]

float nifti_1_header::pixdim[8]

Grid spacings.

Definition at line 53 of file vtkNIFTIImagePrivate.h.

◆ vox_offset [1/2]

float nifti_1_header::vox_offset

Offset into .nii file

Definition at line 54 of file vtkNIFTIImagePrivate.h.

◆ scl_slope [1/2]

float nifti_1_header::scl_slope

Data scaling: slope.

Definition at line 55 of file vtkNIFTIImagePrivate.h.

◆ scl_inter [1/2]

float nifti_1_header::scl_inter

Data scaling: offset.

Definition at line 56 of file vtkNIFTIImagePrivate.h.

◆ slice_end [1/2]

short nifti_1_header::slice_end

Last slice index.

Definition at line 57 of file vtkNIFTIImagePrivate.h.

◆ slice_code [1/2]

char nifti_1_header::slice_code

Slice timing order.

Definition at line 58 of file vtkNIFTIImagePrivate.h.

◆ xyzt_units [1/2]

char nifti_1_header::xyzt_units

Units of pixdim[1..4]

Definition at line 59 of file vtkNIFTIImagePrivate.h.

◆ cal_max [1/2]

float nifti_1_header::cal_max

Max display intensity

Definition at line 60 of file vtkNIFTIImagePrivate.h.

◆ cal_min [1/2]

float nifti_1_header::cal_min

Min display intensity

Definition at line 61 of file vtkNIFTIImagePrivate.h.

◆ slice_duration [1/2]

float nifti_1_header::slice_duration

Time for 1 slice.

Definition at line 62 of file vtkNIFTIImagePrivate.h.

◆ toffset [1/2]

float nifti_1_header::toffset

Time axis shift.

Definition at line 63 of file vtkNIFTIImagePrivate.h.

◆ glmax

int nifti_1_header::glmax

++UNUSED++

Definition at line 64 of file vtkNIFTIImagePrivate.h.

◆ glmin

int nifti_1_header::glmin

++UNUSED++

Definition at line 65 of file vtkNIFTIImagePrivate.h.

◆ descrip [1/2]

char nifti_1_header::descrip[80]

any text you like.

Definition at line 66 of file vtkNIFTIImagePrivate.h.

◆ aux_file [1/2]

char nifti_1_header::aux_file[24]

auxiliary filename.

Definition at line 67 of file vtkNIFTIImagePrivate.h.

◆ qform_code [1/2]

short nifti_1_header::qform_code

NIFTI_XFORM_* code.

Definition at line 68 of file vtkNIFTIImagePrivate.h.

◆ sform_code [1/2]

short nifti_1_header::sform_code

NIFTI_XFORM_* code.

Definition at line 69 of file vtkNIFTIImagePrivate.h.

◆ quatern_b [1/2]

float nifti_1_header::quatern_b

Quaternion b param.

Definition at line 70 of file vtkNIFTIImagePrivate.h.

◆ quatern_c [1/2]

float nifti_1_header::quatern_c

Quaternion c param.

Definition at line 71 of file vtkNIFTIImagePrivate.h.

◆ quatern_d [1/2]

float nifti_1_header::quatern_d

Quaternion d param.

Definition at line 72 of file vtkNIFTIImagePrivate.h.

◆ qoffset_x [1/2]

float nifti_1_header::qoffset_x

Quaternion x shift.

Definition at line 73 of file vtkNIFTIImagePrivate.h.

◆ qoffset_y [1/2]

float nifti_1_header::qoffset_y

Quaternion y shift.

Definition at line 74 of file vtkNIFTIImagePrivate.h.

◆ qoffset_z [1/2]

float nifti_1_header::qoffset_z

Quaternion z shift.

Definition at line 75 of file vtkNIFTIImagePrivate.h.

◆ srow_x [1/2]

float nifti_1_header::srow_x[4]

1st row affine transform.

Definition at line 76 of file vtkNIFTIImagePrivate.h.

◆ srow_y [1/2]

float nifti_1_header::srow_y[4]

2nd row affine transform.

Definition at line 77 of file vtkNIFTIImagePrivate.h.

◆ srow_z [1/2]

float nifti_1_header::srow_z[4]

3rd row affine transform.

Definition at line 78 of file vtkNIFTIImagePrivate.h.

◆ intent_name [1/2]

char nifti_1_header::intent_name[16]

'name' or meaning of data.

Definition at line 79 of file vtkNIFTIImagePrivate.h.

◆ magic [1/2]

char nifti_1_header::magic[4]

MUST be "ni1\0" or "n+1\0".

Definition at line 80 of file vtkNIFTIImagePrivate.h.

◆ sizeof_hdr [2/2]

int nifti_2_header::sizeof_hdr

MUST be 540

Definition at line 223 of file vtkNIFTIImagePrivate.h.

◆ magic [2/2]

char nifti_2_header::magic[8]

MUST be valid signature.

Definition at line 224 of file vtkNIFTIImagePrivate.h.

◆ datatype [2/2]

short nifti_2_header::datatype

Defines data type!

Definition at line 225 of file vtkNIFTIImagePrivate.h.

◆ bitpix [2/2]

short nifti_2_header::bitpix

Number bits/voxel.

Definition at line 226 of file vtkNIFTIImagePrivate.h.

◆ dim [2/2]

long long nifti_2_header::dim[8]

Data array dimensions.

Definition at line 227 of file vtkNIFTIImagePrivate.h.

◆ intent_p1 [2/2]

double nifti_2_header::intent_p1

1st intent parameter.

Definition at line 228 of file vtkNIFTIImagePrivate.h.

◆ intent_p2 [2/2]

double nifti_2_header::intent_p2

2nd intent parameter.

Definition at line 229 of file vtkNIFTIImagePrivate.h.

◆ intent_p3 [2/2]

double nifti_2_header::intent_p3

3rd intent parameter.

Definition at line 230 of file vtkNIFTIImagePrivate.h.

◆ pixdim [2/2]

double nifti_2_header::pixdim[8]

Grid spacings.

Definition at line 231 of file vtkNIFTIImagePrivate.h.

◆ vox_offset [2/2]

long long nifti_2_header::vox_offset

Offset into .nii file

Definition at line 232 of file vtkNIFTIImagePrivate.h.

◆ scl_slope [2/2]

double nifti_2_header::scl_slope

Data scaling: slope.

Definition at line 233 of file vtkNIFTIImagePrivate.h.

◆ scl_inter [2/2]

double nifti_2_header::scl_inter

Data scaling: offset.

Definition at line 234 of file vtkNIFTIImagePrivate.h.

◆ cal_max [2/2]

double nifti_2_header::cal_max

Max display intensity

Definition at line 235 of file vtkNIFTIImagePrivate.h.

◆ cal_min [2/2]

double nifti_2_header::cal_min

Min display intensity

Definition at line 236 of file vtkNIFTIImagePrivate.h.

◆ slice_duration [2/2]

double nifti_2_header::slice_duration

Time for 1 slice.

Definition at line 237 of file vtkNIFTIImagePrivate.h.

◆ toffset [2/2]

double nifti_2_header::toffset

Time axis shift.

Definition at line 238 of file vtkNIFTIImagePrivate.h.

◆ slice_start [2/2]

long long nifti_2_header::slice_start

First slice index.

Definition at line 239 of file vtkNIFTIImagePrivate.h.

◆ slice_end [2/2]

long long nifti_2_header::slice_end

Last slice index.

Definition at line 240 of file vtkNIFTIImagePrivate.h.

◆ descrip [2/2]

char nifti_2_header::descrip[80]

any text you like.

Definition at line 241 of file vtkNIFTIImagePrivate.h.

◆ aux_file [2/2]

char nifti_2_header::aux_file[24]

auxiliary filename.

Definition at line 242 of file vtkNIFTIImagePrivate.h.

◆ qform_code [2/2]

int nifti_2_header::qform_code

NIFTI_XFORM_* code.

Definition at line 243 of file vtkNIFTIImagePrivate.h.

◆ sform_code [2/2]

int nifti_2_header::sform_code

NIFTI_XFORM_* code.

Definition at line 244 of file vtkNIFTIImagePrivate.h.

◆ quatern_b [2/2]

double nifti_2_header::quatern_b

Quaternion b param.

Definition at line 245 of file vtkNIFTIImagePrivate.h.

◆ quatern_c [2/2]

double nifti_2_header::quatern_c

Quaternion c param.

Definition at line 246 of file vtkNIFTIImagePrivate.h.

◆ quatern_d [2/2]

double nifti_2_header::quatern_d

Quaternion d param.

Definition at line 247 of file vtkNIFTIImagePrivate.h.

◆ qoffset_x [2/2]

double nifti_2_header::qoffset_x

Quaternion x shift.

Definition at line 248 of file vtkNIFTIImagePrivate.h.

◆ qoffset_y [2/2]

double nifti_2_header::qoffset_y

Quaternion y shift.

Definition at line 249 of file vtkNIFTIImagePrivate.h.

◆ qoffset_z [2/2]

double nifti_2_header::qoffset_z

Quaternion z shift.

Definition at line 250 of file vtkNIFTIImagePrivate.h.

◆ srow_x [2/2]

double nifti_2_header::srow_x[4]

1st row affine transform.

Definition at line 251 of file vtkNIFTIImagePrivate.h.

◆ srow_y [2/2]

double nifti_2_header::srow_y[4]

2nd row affine transform.

Definition at line 252 of file vtkNIFTIImagePrivate.h.

◆ srow_z [2/2]

double nifti_2_header::srow_z[4]

3rd row affine transform.

Definition at line 253 of file vtkNIFTIImagePrivate.h.

◆ slice_code [2/2]

int nifti_2_header::slice_code

Slice timing order.

Definition at line 254 of file vtkNIFTIImagePrivate.h.

◆ xyzt_units [2/2]

int nifti_2_header::xyzt_units

Units of pixdim[1..4]

Definition at line 255 of file vtkNIFTIImagePrivate.h.

◆ intent_code [2/2]

int nifti_2_header::intent_code

NIFTI_INTENT_* code.

Definition at line 256 of file vtkNIFTIImagePrivate.h.

◆ intent_name [2/2]

char nifti_2_header::intent_name[16]

'name' or meaning of data.

Definition at line 257 of file vtkNIFTIImagePrivate.h.

◆ dim_info [2/2]

char nifti_2_header::dim_info

MRI slice ordering.

Definition at line 258 of file vtkNIFTIImagePrivate.h.

◆ unused_str

char nifti_2_header::unused_str[15]

unused, filled with \0

Definition at line 259 of file vtkNIFTIImagePrivate.h.

h