1 /** @file clitkResampleImage_ggo.h
2 * @brief The header file for the command line option parser
3 * generated by GNU Gengetopt version 2.22
4 * http://www.gnu.org/software/gengetopt.
5 * DO NOT modify this file, since it can be overwritten
6 * @author GNU Gengetopt by Lorenzo Bettini */
8 #ifndef CLITKRESAMPLEIMAGE_GGO_H
9 #define CLITKRESAMPLEIMAGE_GGO_H
11 /* If we use autoconf. */
16 #include <stdio.h> /* for FILE */
20 #endif /* __cplusplus */
22 #ifndef CMDLINE_PARSER_CLITKRESAMPLEIMAGE_PACKAGE
23 /** @brief the program name */
24 #define CMDLINE_PARSER_CLITKRESAMPLEIMAGE_PACKAGE "clitkResampleImage"
27 #ifndef CMDLINE_PARSER_CLITKRESAMPLEIMAGE_VERSION
28 /** @brief the program version */
29 #define CMDLINE_PARSER_CLITKRESAMPLEIMAGE_VERSION "2.0"
32 /** @brief Where the command line options are stored */
33 struct args_info_clitkResampleImage
35 const char *help_help; /**< @brief Print help and exit help description. */
36 const char *version_help; /**< @brief Print version and exit help description. */
37 char * config_arg; /**< @brief Config file. */
38 char * config_orig; /**< @brief Config file original value given at command line. */
39 const char *config_help; /**< @brief Config file help description. */
40 int verbose_flag; /**< @brief Verbose (default=off). */
41 const char *verbose_help; /**< @brief Verbose help description. */
42 int imagetypes_flag; /**< @brief Verbose: allowed image types (default=off). */
43 const char *imagetypes_help; /**< @brief Verbose: allowed image types help description. */
44 int thread_arg; /**< @brief Nb of thread to use (default=max). */
45 char * thread_orig; /**< @brief Nb of thread to use (default=max) original value given at command line. */
46 const char *thread_help; /**< @brief Nb of thread to use (default=max) help description. */
47 char * input_arg; /**< @brief Input image filename. */
48 char * input_orig; /**< @brief Input image filename original value given at command line. */
49 const char *input_help; /**< @brief Input image filename help description. */
50 char * output_arg; /**< @brief Output image filename. */
51 char * output_orig; /**< @brief Output image filename original value given at command line. */
52 const char *output_help; /**< @brief Output image filename help description. */
53 char * like_arg; /**< @brief Resample like this image. */
54 char * like_orig; /**< @brief Resample like this image original value given at command line. */
55 const char *like_help; /**< @brief Resample like this image help description. */
56 int* size_arg; /**< @brief Number of pixels of each coordonate (default='0'). */
57 char ** size_orig; /**< @brief Number of pixels of each coordonate original value given at command line. */
58 int size_min; /**< @brief Number of pixels of each coordonate's minimum occurreces */
59 int size_max; /**< @brief Number of pixels of each coordonate's maximum occurreces */
60 const char *size_help; /**< @brief Number of pixels of each coordonate help description. */
61 float* spacing_arg; /**< @brief Spacing in mm between pixels (default='-1.0'). */
62 char ** spacing_orig; /**< @brief Spacing in mm between pixels original value given at command line. */
63 int spacing_min; /**< @brief Spacing in mm between pixels's minimum occurreces */
64 int spacing_max; /**< @brief Spacing in mm between pixels's maximum occurreces */
65 const char *spacing_help; /**< @brief Spacing in mm between pixels help description. */
66 float default_arg; /**< @brief Default pixel value (default='0.0'). */
67 char * default_orig; /**< @brief Default pixel value original value given at command line. */
68 const char *default_help; /**< @brief Default pixel value help description. */
69 int time_flag; /**< @brief Last Dimension Is Time -> do not resample it (auto on for 4D) (default=off). */
70 const char *time_help; /**< @brief Last Dimension Is Time -> do not resample it (auto on for 4D) help description. */
71 char * interp_arg; /**< @brief Interpolation type: {nn, linear, bspline, blut} (default='nn'). */
72 char * interp_orig; /**< @brief Interpolation type: {nn, linear, bspline, blut} original value given at command line. */
73 const char *interp_help; /**< @brief Interpolation type: {nn, linear, bspline, blut} help description. */
74 int order_arg; /**< @brief BSpline ordre (range 0-5) (default='3'). */
75 char * order_orig; /**< @brief BSpline ordre (range 0-5) original value given at command line. */
76 const char *order_help; /**< @brief BSpline ordre (range 0-5) help description. */
77 int sampling_arg; /**< @brief BLUT sampling value (default='30'). */
78 char * sampling_orig; /**< @brief BLUT sampling value original value given at command line. */
79 const char *sampling_help; /**< @brief BLUT sampling value help description. */
80 float* gauss_arg; /**< @brief Apply Gaussian before (sigma in mm) (default='0.0'). */
81 char ** gauss_orig; /**< @brief Apply Gaussian before (sigma in mm) original value given at command line. */
82 int gauss_min; /**< @brief Apply Gaussian before (sigma in mm)'s minimum occurreces */
83 int gauss_max; /**< @brief Apply Gaussian before (sigma in mm)'s maximum occurreces */
84 const char *gauss_help; /**< @brief Apply Gaussian before (sigma in mm) help description. */
85 int autogauss_flag; /**< @brief Apply Gaussian with auto sigma when downsample (default=off). */
86 const char *autogauss_help; /**< @brief Apply Gaussian with auto sigma when downsample help description. */
88 unsigned int help_given ; /**< @brief Whether help was given. */
89 unsigned int version_given ; /**< @brief Whether version was given. */
90 unsigned int config_given ; /**< @brief Whether config was given. */
91 unsigned int verbose_given ; /**< @brief Whether verbose was given. */
92 unsigned int imagetypes_given ; /**< @brief Whether imagetypes was given. */
93 unsigned int thread_given ; /**< @brief Whether thread was given. */
94 unsigned int input_given ; /**< @brief Whether input was given. */
95 unsigned int output_given ; /**< @brief Whether output was given. */
96 unsigned int like_given ; /**< @brief Whether like was given. */
97 unsigned int size_given ; /**< @brief Whether size was given. */
98 unsigned int spacing_given ; /**< @brief Whether spacing was given. */
99 unsigned int default_given ; /**< @brief Whether default was given. */
100 unsigned int time_given ; /**< @brief Whether time was given. */
101 unsigned int interp_given ; /**< @brief Whether interp was given. */
102 unsigned int order_given ; /**< @brief Whether order was given. */
103 unsigned int sampling_given ; /**< @brief Whether sampling was given. */
104 unsigned int gauss_given ; /**< @brief Whether gauss was given. */
105 unsigned int autogauss_given ; /**< @brief Whether autogauss was given. */
107 char **inputs ; /**< @brief unamed options (options without names) */
108 unsigned inputs_num ; /**< @brief unamed options number */
111 /** @brief The additional parameters to pass to parser functions */
112 struct cmdline_parser_clitkResampleImage_params
114 int override; /**< @brief whether to override possibly already present options (default 0) */
115 int initialize; /**< @brief whether to initialize the option structure args_info_clitkResampleImage (default 1) */
116 int check_required; /**< @brief whether to check that all required options were provided (default 1) */
117 int check_ambiguity; /**< @brief whether to check for options already specified in the option structure args_info_clitkResampleImage (default 0) */
118 int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
121 /** @brief the purpose string of the program */
122 extern const char *args_info_clitkResampleImage_purpose;
123 /** @brief the usage string of the program */
124 extern const char *args_info_clitkResampleImage_usage;
125 /** @brief all the lines making the help output */
126 extern const char *args_info_clitkResampleImage_help[];
129 * The command line parser
130 * @param argc the number of command line options
131 * @param argv the command line options
132 * @param args_info the structure where option information will be stored
133 * @return 0 if everything went fine, NON 0 if an error took place
135 int cmdline_parser_clitkResampleImage (int argc, char * const *argv,
136 struct args_info_clitkResampleImage *args_info);
139 * The command line parser (version with additional parameters - deprecated)
140 * @param argc the number of command line options
141 * @param argv the command line options
142 * @param args_info the structure where option information will be stored
143 * @param override whether to override possibly already present options
144 * @param initialize whether to initialize the option structure my_args_info
145 * @param check_required whether to check that all required options were provided
146 * @return 0 if everything went fine, NON 0 if an error took place
147 * @deprecated use cmdline_parser_clitkResampleImage_ext() instead
149 int cmdline_parser_clitkResampleImage2 (int argc, char * const *argv,
150 struct args_info_clitkResampleImage *args_info,
151 int override, int initialize, int check_required);
154 * The command line parser (version with additional parameters)
155 * @param argc the number of command line options
156 * @param argv the command line options
157 * @param args_info the structure where option information will be stored
158 * @param params additional parameters for the parser
159 * @return 0 if everything went fine, NON 0 if an error took place
161 int cmdline_parser_clitkResampleImage_ext (int argc, char * const *argv,
162 struct args_info_clitkResampleImage *args_info,
163 struct cmdline_parser_clitkResampleImage_params *params);
166 * Save the contents of the option struct into an already open FILE stream.
167 * @param outfile the stream where to dump options
168 * @param args_info the option struct to dump
169 * @return 0 if everything went fine, NON 0 if an error took place
171 int cmdline_parser_clitkResampleImage_dump(FILE *outfile,
172 struct args_info_clitkResampleImage *args_info);
175 * Save the contents of the option struct into a (text) file.
176 * This file can be read by the config file parser (if generated by gengetopt)
177 * @param filename the file where to save
178 * @param args_info the option struct to save
179 * @return 0 if everything went fine, NON 0 if an error took place
181 int cmdline_parser_clitkResampleImage_file_save(const char *filename,
182 struct args_info_clitkResampleImage *args_info);
187 void cmdline_parser_clitkResampleImage_print_help(void);
191 void cmdline_parser_clitkResampleImage_print_version(void);
194 * Initializes all the fields a cmdline_parser_clitkResampleImage_params structure
195 * to their default values
196 * @param params the structure to initialize
198 void cmdline_parser_clitkResampleImage_params_init(struct cmdline_parser_clitkResampleImage_params *params);
201 * Allocates dynamically a cmdline_parser_clitkResampleImage_params structure and initializes
202 * all its fields to their default values
203 * @return the created and initialized cmdline_parser_clitkResampleImage_params structure
205 struct cmdline_parser_clitkResampleImage_params *cmdline_parser_clitkResampleImage_params_create(void);
208 * Initializes the passed args_info_clitkResampleImage structure's fields
209 * (also set default values for options that have a default)
210 * @param args_info the structure to initialize
212 void cmdline_parser_clitkResampleImage_init (struct args_info_clitkResampleImage *args_info);
214 * Deallocates the string fields of the args_info_clitkResampleImage structure
215 * (but does not deallocate the structure itself)
216 * @param args_info the structure to deallocate
218 void cmdline_parser_clitkResampleImage_free (struct args_info_clitkResampleImage *args_info);
221 * The config file parser (deprecated version)
222 * @param filename the name of the config file
223 * @param args_info the structure where option information will be stored
224 * @param override whether to override possibly already present options
225 * @param initialize whether to initialize the option structure my_args_info
226 * @param check_required whether to check that all required options were provided
227 * @return 0 if everything went fine, NON 0 if an error took place
228 * @deprecated use cmdline_parser_clitkResampleImage_config_file() instead
230 int cmdline_parser_clitkResampleImage_configfile (char * const filename,
231 struct args_info_clitkResampleImage *args_info,
232 int override, int initialize, int check_required);
235 * The config file parser
236 * @param filename the name of the config file
237 * @param args_info the structure where option information will be stored
238 * @param params additional parameters for the parser
239 * @return 0 if everything went fine, NON 0 if an error took place
241 int cmdline_parser_clitkResampleImage_config_file (char * const filename,
242 struct args_info_clitkResampleImage *args_info,
243 struct cmdline_parser_clitkResampleImage_params *params);
246 * Checks that all the required options were specified
247 * @param args_info the structure to check
248 * @param prog_name the name of the program that will be used to print
252 int cmdline_parser_clitkResampleImage_required (struct args_info_clitkResampleImage *args_info,
253 const char *prog_name);
258 #endif /* __cplusplus */
259 #endif /* CLITKRESAMPLEIMAGE_GGO_H */