nifti1_io
Macros | Variables

nifti1 slice order codes, describing the acquisition order of the slices More...

Collaboration diagram for NIFTI1_SLICE_ORDER:

Macros

#define NIFTI_SLICE_UNKNOWN   0
 
#define NIFTI_SLICE_SEQ_INC   1
 
#define NIFTI_SLICE_SEQ_DEC   2
 
#define NIFTI_SLICE_ALT_INC   3
 
#define NIFTI_SLICE_ALT_DEC   4
 
#define NIFTI_SLICE_ALT_INC2   5 /* 05 May 2005: RWCox */
 
#define NIFTI_SLICE_ALT_DEC2   6 /* 05 May 2005: RWCox */
 
#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 NIFTI_5TH_DIM(h)   ( ((h).dim[0]>4 && (h).dim[5]>1) ? (h).dim[5] : 0 )
 

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]
 
char nifti1_extender::extension [4]
 
int nifti1_extension::esize
 
int nifti1_extension::ecode
 
char * nifti1_extension::edata
 

Detailed Description

nifti1 slice order codes, describing the acquisition order of the slices

Macro Definition Documentation

◆ NIFTI_5TH_DIM

#define NIFTI_5TH_DIM (   h)    ( ((h).dim[0]>4 && (h).dim[5]>1) ? (h).dim[5] : 0 )

Check if a nifti_1_header struct contains a 5th (vector) dimension. Returns size of 5th dimension if > 1, returns 0 otherwise.

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

char nifti_1_header::aux_file[24]

auxiliary filename.

◆ bitpix

short nifti_1_header::bitpix

Number bits/voxel.

◆ cal_max

float nifti_1_header::cal_max

Max display intensity

◆ cal_min

float nifti_1_header::cal_min

Min display intensity

◆ data_type

char nifti_1_header::data_type[10]

++UNUSED++

◆ datatype

short nifti_1_header::datatype

Defines data type!

◆ db_name

char nifti_1_header::db_name[18]

++UNUSED++

◆ descrip

char nifti_1_header::descrip[80]

any text you like.

◆ dim

short nifti_1_header::dim[8]

Data array dimensions.

◆ dim_info

char nifti_1_header::dim_info

MRI slice ordering.

◆ ecode

int nifti1_extension::ecode

extension code, one of the NIFTI_ECODE_ values

◆ edata

char* nifti1_extension::edata

raw data, with no byte swapping (length is esize-8)

◆ esize

int nifti1_extension::esize

size of extension, in bytes (must be multiple of 16)

◆ extents

int nifti_1_header::extents

++UNUSED++

◆ glmax

int nifti_1_header::glmax

++UNUSED++

◆ glmin

int nifti_1_header::glmin

++UNUSED++

◆ intent_code

short nifti_1_header::intent_code

NIFTI_INTENT_* code.

◆ intent_name

char nifti_1_header::intent_name[16]

'name' or meaning of data.

◆ intent_p1

float nifti_1_header::intent_p1

1st intent parameter.

◆ intent_p2

float nifti_1_header::intent_p2

2nd intent parameter.

◆ intent_p3

float nifti_1_header::intent_p3

3rd intent parameter.

◆ magic

char nifti_1_header::magic[4]

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

◆ pixdim

float nifti_1_header::pixdim[8]

Grid spacings.

◆ qform_code

short nifti_1_header::qform_code

NIFTI_XFORM_* code.

◆ qoffset_x

float nifti_1_header::qoffset_x

Quaternion x shift.

◆ qoffset_y

float nifti_1_header::qoffset_y

Quaternion y shift.

◆ qoffset_z

float nifti_1_header::qoffset_z

Quaternion z shift.

◆ quatern_b

float nifti_1_header::quatern_b

Quaternion b param.

◆ quatern_c

float nifti_1_header::quatern_c

Quaternion c param.

◆ quatern_d

float nifti_1_header::quatern_d

Quaternion d param.

◆ regular

char nifti_1_header::regular

++UNUSED++

◆ scl_inter

float nifti_1_header::scl_inter

Data scaling: offset.

◆ scl_slope

float nifti_1_header::scl_slope

Data scaling: slope.

◆ session_error

short nifti_1_header::session_error

++UNUSED++

◆ sform_code

short nifti_1_header::sform_code

NIFTI_XFORM_* code.

◆ sizeof_hdr

int nifti_1_header::sizeof_hdr

MUST be 348

◆ slice_code

char nifti_1_header::slice_code

Slice timing order.

◆ slice_duration

float nifti_1_header::slice_duration

Time for 1 slice.

◆ slice_end

short nifti_1_header::slice_end

Last slice index.

◆ slice_start

short nifti_1_header::slice_start

First slice index.

◆ srow_x

float nifti_1_header::srow_x[4]

1st row affine transform.

◆ srow_y

float nifti_1_header::srow_y[4]

2nd row affine transform.

◆ srow_z

float nifti_1_header::srow_z[4]

3rd row affine transform.

◆ toffset

float nifti_1_header::toffset

Time axis shift.

◆ vox_offset

float nifti_1_header::vox_offset

Offset into .nii file

◆ xyzt_units

char nifti_1_header::xyzt_units

Units of pixdim[1..4]