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"
102int act_add_exts (
nt_opts * opts );
105int act_check_hdrs (
nt_opts * opts );
106int act_diff_hdrs (
nt_opts * opts );
107int act_diff_nims (
nt_opts * opts );
108int act_disp_ci (
nt_opts * opts );
109int act_disp_exts (
nt_opts * opts );
110int act_disp_hdrs (
nt_opts * opts );
111int act_disp_nims (
nt_opts * opts );
112int act_disp_anas (
nt_opts * opts );
113int act_disp_ts (
nt_opts * opts );
114int act_mod_hdrs (
nt_opts * opts );
115int act_mod_nims (
nt_opts * opts );
116int act_swap_hdrs (
nt_opts * opts );
117int act_rm_ext (
nt_opts * opts );
118int act_strip (
nt_opts * opts );
121field_s * get_hdr_field(
const char * fname,
int show_fail );
122field_s * get_nim_field(
const char * fname,
int show_fail );
123const char * field_type_str (
int type);
131int add_int (
int_list * ilist,
int val);
132int add_string (
str_list * slist,
const char * str);
133int check_total_size (
const char *mesg,
field_s *fields,
int nfields,
int tot_size);
134int clear_float_zeros(
char * str );
135int diff_field (
field_s *fieldp,
void * str0,
void * str1,
int nfields);
136int disp_nifti1_extension(
const char *mesg,
nifti1_extension * ext,
int maxlen);
137int disp_field (
const char *mesg,
field_s *fieldp,
void *str,
int nfields,
int header);
138int disp_field_s_list(
const char *mesg,
field_s *,
int nfields);
139int disp_nt_opts (
const char *mesg,
nt_opts * opts);
140int disp_raw_data (
void * data,
int type,
int nvals,
char space,
int newline);
141int fill_cmd_string (
nt_opts * opts,
int argc,
char * argv[]);
142int fill_field (
field_s *fp,
int type,
int offset,
int num,
const char *name);
143int fill_hdr_field_array(
field_s * nh_fields);
144int fill_nim_field_array(
field_s * nim_fields);
145int fill_ana_field_array(
field_s * ah_fields);
146int modify_all_fields(
void *basep,
nt_opts *opts,
field_s *fields,
int flen);
147int modify_field (
void * basep,
field_s * field,
const char * data);
148int process_opts (
int argc,
char * argv[],
nt_opts * opts);
149int remove_ext_list (
nifti_image * nim,
const char ** elist,
int len);
150int usage (
const char * prog,
int level);
151int use_full (
const char * prog);
152int 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