6 #ifndef _NIFTI_IO_HEADER_
7 #define _NIFTI_IO_HEADER_
15 #ifndef DONT_INCLUDE_ANALYZE_STRUCT
16 #define DONT_INCLUDE_ANALYZE_STRUCT
72 typedef enum _analyze75_orient_code {
73 a75_transverse_unflipped = 0,
74 a75_coronal_unflipped = 1,
75 a75_sagittal_unflipped = 2,
76 a75_transverse_flipped = 3,
77 a75_coronal_flipped = 4,
78 a75_sagittal_flipped = 5,
79 a75_orient_unknown = 6
80 } analyze_75_orient_code;
133 qoffset_x , qoffset_y , qoffset_z ,
154 char intent_name[16] ;
194 short int session_error;
298 int *start_index,
int *region_size,
335 const int * blist,
int disp_error);
347 size_t nifti_write_buffer(
znzFile fp,
const void * buffer,
size_t numbytes);
351 const char * opts,
int write_data,
int leave_open);
357 float *qb,
float *qc,
float *qd,
358 float *qx,
float *qy,
float *qz,
359 float *dx,
float *dy,
float *dz,
float *qfac ) ;
362 float qx,
float qy,
float qz,
363 float dx,
float dy,
float dz,
float qfac );
366 float r21,
float r22,
float r23 ,
367 float r31,
float r32,
float r33 ) ;
429 #define NIFTI_ECODE_IGNORE 0
431 #define NIFTI_ECODE_DICOM 2
433 #define NIFTI_ECODE_AFNI 4
436 #define NIFTI_ECODE_COMMENT 6
438 #define NIFTI_ECODE_XCEDE 8
443 #define NIFTI_ECODE_JIMDIMINFO 10
447 #define NIFTI_ECODE_WORKFLOW_FWDS 12
452 #define NIFTI_ECODE_FREESURFER 14
454 #define NIFTI_ECODE_PYPICKLE 16
459 #define NIFTI_ECODE_MIND_IDENT 18
460 #define NIFTI_ECODE_B_VALUE 20
461 #define NIFTI_ECODE_SPHERICAL_DIRECTION 22
462 #define NIFTI_ECODE_DT_COMPONENT 24
463 #define NIFTI_ECODE_SHC_DEGREEORDER 26
465 #define NIFTI_ECODE_VOXBO 28
467 #define NIFTI_ECODE_CARET 30
472 #define NIFTI_MAX_ECODE 30
475 #define NIFTI_FTYPE_ANALYZE 0
476 #define NIFTI_FTYPE_NIFTI1_1 1
477 #define NIFTI_FTYPE_NIFTI1_2 2
478 #define NIFTI_FTYPE_ASCII 3
479 #define NIFTI_MAX_FTYPE 3
489 int allow_upper_fext;
490 } nifti_global_options;
500 #define LNI_FERR(func,msg,file) \
501 fprintf(stderr,"** ERROR (%s): %s '%s'\n",func,msg,file)
505 #define swap_2(s) nifti_swap_2bytes(1,&(s))
506 #define swap_4(v) nifti_swap_4bytes(1,&(v))
515 # define IS_GOOD_FLOAT(x) isfinite(x)
516 # define FIXED_FLOAT(x) (isfinite(x) ? (x) : 0)
518 # define IS_GOOD_FLOAT(x) 1
519 # define FIXED_FLOAT(x) (x)
523 #define ASSIF(p,v) if( (p)!=NULL ) *(p) = (v)
530 #define REVERSE_ORDER(x) (3-(x))
532 #define LNI_MAX_NIA_EXT_LEN 100000