vtk-dicom  0.8.17
Classes | Macros | Typedefs | Variables
NIFTI1_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 )
 
#define __NIFTI2_HEADER
 

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_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.

◆ 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.

◆ NIFTI_TYPE_COMPLEX128

#define NIFTI_TYPE_COMPLEX128   1792

128 bit complex = 2 64 bit floats.

◆ NIFTI_TYPE_COMPLEX256

#define NIFTI_TYPE_COMPLEX256   2048

256 bit complex = 2 128 bit floats

◆ NIFTI_TYPE_COMPLEX64

#define NIFTI_TYPE_COMPLEX64   32

64 bit complex = 2 32 bit floats.

◆ NIFTI_TYPE_FLOAT128

#define NIFTI_TYPE_FLOAT128   1536

128 bit float = long double.

◆ NIFTI_TYPE_FLOAT32

#define NIFTI_TYPE_FLOAT32   16

32 bit float.

◆ NIFTI_TYPE_FLOAT64

#define NIFTI_TYPE_FLOAT64   64

64 bit float = double.

◆ NIFTI_TYPE_INT16

#define NIFTI_TYPE_INT16   4

signed short.

◆ NIFTI_TYPE_INT32

#define NIFTI_TYPE_INT32   8

signed int.

◆ NIFTI_TYPE_INT64

#define NIFTI_TYPE_INT64   1024

signed long long.

◆ NIFTI_TYPE_INT8

#define NIFTI_TYPE_INT8   256

signed char.

◆ NIFTI_TYPE_RGB24

#define NIFTI_TYPE_RGB24   128

3 8 bit bytes.

◆ NIFTI_TYPE_RGBA32

#define NIFTI_TYPE_RGBA32   2304

4 8 bit bytes.

◆ NIFTI_TYPE_UINT16

#define NIFTI_TYPE_UINT16   512

unsigned short.

◆ NIFTI_TYPE_UINT32

#define NIFTI_TYPE_UINT32   768

unsigned int.

◆ NIFTI_TYPE_UINT64

#define NIFTI_TYPE_UINT64   1280

unsigned long long.

◆ NIFTI_TYPE_UINT8

#define NIFTI_TYPE_UINT8   2

unsigned char.

◆ 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.

Variable Documentation

◆ aux_file [1/2]

char nifti_1_header::aux_file[24]

auxiliary filename.

◆ aux_file [2/2]

char nifti_2_header::aux_file[24]

auxiliary filename.

◆ bitpix [1/2]

short nifti_1_header::bitpix

Number bits/voxel.

◆ bitpix [2/2]

short nifti_2_header::bitpix

Number bits/voxel.

◆ cal_max [1/2]

float nifti_1_header::cal_max

Max display intensity

◆ cal_max [2/2]

double nifti_2_header::cal_max

Max display intensity

◆ cal_min [1/2]

float nifti_1_header::cal_min

Min display intensity

◆ cal_min [2/2]

double nifti_2_header::cal_min

Min display intensity

◆ data_type

char nifti_1_header::data_type[10]

++UNUSED++

◆ datatype [1/2]

short nifti_1_header::datatype

Defines data type!

◆ datatype [2/2]

short nifti_2_header::datatype

Defines data type!

◆ db_name

char nifti_1_header::db_name[18]

++UNUSED++

◆ descrip [1/2]

char nifti_1_header::descrip[80]

any text you like.

◆ descrip [2/2]

char nifti_2_header::descrip[80]

any text you like.

◆ dim [1/2]

short nifti_1_header::dim[8]

Data array dimensions.

◆ dim [2/2]

long long nifti_2_header::dim[8]

Data array dimensions.

◆ dim_info [1/2]

char nifti_1_header::dim_info

MRI slice ordering.

◆ dim_info [2/2]

char nifti_2_header::dim_info

MRI slice ordering.

◆ extents

int nifti_1_header::extents

++UNUSED++

◆ glmax

int nifti_1_header::glmax

++UNUSED++

◆ glmin

int nifti_1_header::glmin

++UNUSED++

◆ intent_code [1/2]

short nifti_1_header::intent_code

NIFTI_INTENT_* code.

◆ intent_code [2/2]

int nifti_2_header::intent_code

NIFTI_INTENT_* code.

◆ intent_name [1/2]

char nifti_1_header::intent_name[16]

'name' or meaning of data.

◆ intent_name [2/2]

char nifti_2_header::intent_name[16]

'name' or meaning of data.

◆ intent_p1 [1/2]

float nifti_1_header::intent_p1

1st intent parameter.

◆ intent_p1 [2/2]

double nifti_2_header::intent_p1

1st intent parameter.

◆ intent_p2 [1/2]

float nifti_1_header::intent_p2

2nd intent parameter.

◆ intent_p2 [2/2]

double nifti_2_header::intent_p2

2nd intent parameter.

◆ intent_p3 [1/2]

float nifti_1_header::intent_p3

3rd intent parameter.

◆ intent_p3 [2/2]

double nifti_2_header::intent_p3

3rd intent parameter.

◆ magic [1/2]

char nifti_1_header::magic[4]

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

◆ magic [2/2]

char nifti_2_header::magic[8]

MUST be valid signature.

◆ pixdim [1/2]

float nifti_1_header::pixdim[8]

Grid spacings.

◆ pixdim [2/2]

double nifti_2_header::pixdim[8]

Grid spacings.

◆ qform_code [1/2]

short nifti_1_header::qform_code

NIFTI_XFORM_* code.

◆ qform_code [2/2]

int nifti_2_header::qform_code

NIFTI_XFORM_* code.

◆ qoffset_x [1/2]

float nifti_1_header::qoffset_x

Quaternion x shift.

◆ qoffset_x [2/2]

double nifti_2_header::qoffset_x

Quaternion x shift.

◆ qoffset_y [1/2]

float nifti_1_header::qoffset_y

Quaternion y shift.

◆ qoffset_y [2/2]

double nifti_2_header::qoffset_y

Quaternion y shift.

◆ qoffset_z [1/2]

float nifti_1_header::qoffset_z

Quaternion z shift.

◆ qoffset_z [2/2]

double nifti_2_header::qoffset_z

Quaternion z shift.

◆ quatern_b [1/2]

float nifti_1_header::quatern_b

Quaternion b param.

◆ quatern_b [2/2]

double nifti_2_header::quatern_b

Quaternion b param.

◆ quatern_c [1/2]

float nifti_1_header::quatern_c

Quaternion c param.

◆ quatern_c [2/2]

double nifti_2_header::quatern_c

Quaternion c param.

◆ quatern_d [1/2]

float nifti_1_header::quatern_d

Quaternion d param.

◆ quatern_d [2/2]

double nifti_2_header::quatern_d

Quaternion d param.

◆ regular

char nifti_1_header::regular

++UNUSED++

◆ scl_inter [1/2]

float nifti_1_header::scl_inter

Data scaling: offset.

◆ scl_inter [2/2]

double nifti_2_header::scl_inter

Data scaling: offset.

◆ scl_slope [1/2]

float nifti_1_header::scl_slope

Data scaling: slope.

◆ scl_slope [2/2]

double nifti_2_header::scl_slope

Data scaling: slope.

◆ session_error

short nifti_1_header::session_error

++UNUSED++

◆ sform_code [1/2]

short nifti_1_header::sform_code

NIFTI_XFORM_* code.

◆ sform_code [2/2]

int nifti_2_header::sform_code

NIFTI_XFORM_* code.

◆ sizeof_hdr [1/2]

int nifti_1_header::sizeof_hdr

MUST be 348

◆ sizeof_hdr [2/2]

int nifti_2_header::sizeof_hdr

MUST be 540

◆ slice_code [1/2]

char nifti_1_header::slice_code

Slice timing order.

◆ slice_code [2/2]

int nifti_2_header::slice_code

Slice timing order.

◆ slice_duration [1/2]

float nifti_1_header::slice_duration

Time for 1 slice.

◆ slice_duration [2/2]

double nifti_2_header::slice_duration

Time for 1 slice.

◆ slice_end [1/2]

short nifti_1_header::slice_end

Last slice index.

◆ slice_end [2/2]

long long nifti_2_header::slice_end

Last slice index.

◆ slice_start [1/2]

short nifti_1_header::slice_start

First slice index.

◆ slice_start [2/2]

long long nifti_2_header::slice_start

First slice index.

◆ srow_x [1/2]

float nifti_1_header::srow_x[4]

1st row affine transform.

◆ srow_x [2/2]

double nifti_2_header::srow_x[4]

1st row affine transform.

◆ srow_y [1/2]

float nifti_1_header::srow_y[4]

2nd row affine transform.

◆ srow_y [2/2]

double nifti_2_header::srow_y[4]

2nd row affine transform.

◆ srow_z [1/2]

float nifti_1_header::srow_z[4]

3rd row affine transform.

◆ srow_z [2/2]

double nifti_2_header::srow_z[4]

3rd row affine transform.

◆ toffset [1/2]

float nifti_1_header::toffset

Time axis shift.

◆ toffset [2/2]

double nifti_2_header::toffset

Time axis shift.

◆ unused_str

char nifti_2_header::unused_str[15]

unused, filled with \0

◆ vox_offset [1/2]

float nifti_1_header::vox_offset

Offset into .nii file

◆ vox_offset [2/2]

long long nifti_2_header::vox_offset

Offset into .nii file

◆ xyzt_units [1/2]

char nifti_1_header::xyzt_units

Units of pixdim[1..4]

◆ xyzt_units [2/2]

int nifti_2_header::xyzt_units

Units of pixdim[1..4]