4 #define NT_CMD_LEN 2048
18 int check_hdr, check_nim;
19 int diff_hdr, diff_nim;
20 int disp_hdr, disp_nim, disp_ana;
21 int disp_exts, add_exts, rm_exts;
23 int swap_hdr, swap_ana, swap_old;
27 int dts, dci, dci_lines;
40 char command[NT_CMD_LEN];
46 #define USE_FIELD_HDR 4
47 #define USE_FIELD_NIM 5
48 #define USE_FIELD_ANA 6
52 #define CHECK_NEXT_OPT(n,m,str) \
53 do { if ( (n) >= (m) ) { \
54 fprintf(stderr,"** option '%s': missing parameter\n",str); \
55 fprintf(stderr," consider: 'nifti_tool -help'\n"); \
59 #define CHECK_NEXT_OPT_MSG(n,m,str,msg) \
60 do { if ( (n) >= (m) ) { \
61 fprintf(stderr,"** option '%s': %s\n",str,msg); \
62 fprintf(stderr," consider: 'nifti_tool -help'\n"); \
71 #define NT_FIELD_NAME_LEN 20
72 #define NT_HDR_NUM_FIELDS 43
73 #define NT_ANA_NUM_FIELDS 47
74 #define NT_NIM_NUM_FIELDS 63
75 #define NT_DT_STRING -0xfff
76 #define NT_DT_POINTER -0xfef
77 #define NT_DT_CHAR_PTR -0xfee
78 #define NT_DT_EXT_PTR -0xfed
85 char name[NT_FIELD_NAME_LEN];
89 #define NT_OFF(str,field) ((int)( ((char *)&str.field) - ((char *)&str) ))
93 #define NT_SFILL(nstr,fldp,type,name,num,rv) do{ \
94 rv=fill_field(fldp,type,NT_OFF(nstr,name),num,#name); \
97 #define NT_MAKE_IM_NAME "MAKE_IM"
102 int act_add_exts (
nt_opts * opts );
103 int act_cbl (
nt_opts * opts );
104 int act_cci (
nt_opts * opts );
105 int act_check_hdrs (
nt_opts * opts );
106 int act_diff_hdrs (
nt_opts * opts );
107 int act_diff_nims (
nt_opts * opts );
108 int act_disp_ci (
nt_opts * opts );
109 int act_disp_exts (
nt_opts * opts );
110 int act_disp_hdrs (
nt_opts * opts );
111 int act_disp_nims (
nt_opts * opts );
112 int act_disp_anas (
nt_opts * opts );
113 int act_disp_ts (
nt_opts * opts );
114 int act_mod_hdrs (
nt_opts * opts );
115 int act_mod_nims (
nt_opts * opts );
116 int act_swap_hdrs (
nt_opts * opts );
117 int act_rm_ext (
nt_opts * opts );
118 int act_strip (
nt_opts * opts );
121 field_s * get_hdr_field(
const char * fname,
int show_fail );
122 field_s * get_nim_field(
const char * fname,
int show_fail );
123 const char * field_type_str (
int type);
131 int add_int (
int_list * ilist,
int val);
132 int add_string (
str_list * slist,
const char * str);
133 int check_total_size (
const char *mesg,
field_s *fields,
int nfields,
int tot_size);
134 int clear_float_zeros(
char * str );
135 int diff_field (
field_s *fieldp,
void * str0,
void * str1,
int nfields);
136 int disp_nifti1_extension(
const char *mesg,
nifti1_extension * ext,
int maxlen);
137 int disp_field (
const char *mesg,
field_s *fieldp,
void *str,
int nfields,
int header);
138 int disp_field_s_list(
const char *mesg,
field_s *,
int nfields);
139 int disp_nt_opts (
const char *mesg,
nt_opts * opts);
140 int disp_raw_data (
void * data,
int type,
int nvals,
char space,
int newline);
141 int fill_cmd_string (
nt_opts * opts,
int argc,
char * argv[]);
142 int fill_field (
field_s *fp,
int type,
int offset,
int num,
const char *name);
143 int fill_hdr_field_array(
field_s * nh_fields);
144 int fill_nim_field_array(
field_s * nim_fields);
145 int fill_ana_field_array(
field_s * ah_fields);
146 int modify_all_fields(
void *basep,
nt_opts *opts,
field_s *fields,
int flen);
147 int modify_field (
void * basep,
field_s * field,
const char * data);
148 int process_opts (
int argc,
char * argv[],
nt_opts * opts);
149 int remove_ext_list (
nifti_image * nim,
const char ** elist,
int len);
150 int usage (
const char * prog,
int level);
151 int use_full (
const char * prog);
152 int verify_opts (
nt_opts * opts,
char * prog);
Definition: nifti1_tool.h:80
Definition: nifti1_tool.h:11
Data structure defining the fields of a header extension.
Definition: nifti1.h:297
Definition: nifti1_io.h:175
High level data structure for open nifti datasets in the nifti1_io API. Note that this structure is n...
Definition: nifti1_io.h:88
Definition: nifti1_tool.h:16
Definition: nifti1_tool.h:6