1 /** @file clitkBinarizeImage_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 CLITKBINARIZEIMAGE_GGO_H
9 #define CLITKBINARIZEIMAGE_GGO_H
11 /* If we use autoconf. */
16 #include <stdio.h> /* for FILE */
20 #endif /* __cplusplus */
22 #ifndef CMDLINE_PARSER_CLITKBINARIZEIMAGE_PACKAGE
23 /** @brief the program name */
24 #define CMDLINE_PARSER_CLITKBINARIZEIMAGE_PACKAGE "clitkBinarizeImage"
27 #ifndef CMDLINE_PARSER_CLITKBINARIZEIMAGE_VERSION
28 /** @brief the program version */
29 #define CMDLINE_PARSER_CLITKBINARIZEIMAGE_VERSION "1.0"
32 /** @brief Where the command line options are stored */
33 struct args_info_clitkBinarizeImage
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 Display allowed image types (default=off). */
43 const char *imagetypes_help; /**< @brief Display allowed image types help description. */
44 char * input_arg; /**< @brief Input image filename. */
45 char * input_orig; /**< @brief Input image filename original value given at command line. */
46 const char *input_help; /**< @brief Input image filename help description. */
47 char * output_arg; /**< @brief Output image filename. */
48 char * output_orig; /**< @brief Output image filename original value given at command line. */
49 const char *output_help; /**< @brief Output image filename help description. */
50 double lower_arg; /**< @brief Lower intensity (default=min), fg is greater than this value. */
51 char * lower_orig; /**< @brief Lower intensity (default=min), fg is greater than this value original value given at command line. */
52 const char *lower_help; /**< @brief Lower intensity (default=min), fg is greater than this value help description. */
53 double upper_arg; /**< @brief Upper intensity (default=max), fg is lower than this value. */
54 char * upper_orig; /**< @brief Upper intensity (default=max), fg is lower than this value original value given at command line. */
55 const char *upper_help; /**< @brief Upper intensity (default=max), fg is lower than this value help description. */
56 double fg_arg; /**< @brief Foreground (FG) or 'inside' value (default='1'). */
57 char * fg_orig; /**< @brief Foreground (FG) or 'inside' value original value given at command line. */
58 const char *fg_help; /**< @brief Foreground (FG) or 'inside' value help description. */
59 double bg_arg; /**< @brief Background (BG) or 'ouside' value (default='0'). */
60 char * bg_orig; /**< @brief Background (BG) or 'ouside' value original value given at command line. */
61 const char *bg_help; /**< @brief Background (BG) or 'ouside' value help description. */
62 char * mode_arg; /**< @brief Use FG and/or BG values (if FG, the BG is replaced by the input image values) (default='both'). */
63 char * mode_orig; /**< @brief Use FG and/or BG values (if FG, the BG is replaced by the input image values) original value given at command line. */
64 const char *mode_help; /**< @brief Use FG and/or BG values (if FG, the BG is replaced by the input image values) help description. */
66 unsigned int help_given ; /**< @brief Whether help was given. */
67 unsigned int version_given ; /**< @brief Whether version was given. */
68 unsigned int config_given ; /**< @brief Whether config was given. */
69 unsigned int verbose_given ; /**< @brief Whether verbose was given. */
70 unsigned int imagetypes_given ; /**< @brief Whether imagetypes was given. */
71 unsigned int input_given ; /**< @brief Whether input was given. */
72 unsigned int output_given ; /**< @brief Whether output was given. */
73 unsigned int lower_given ; /**< @brief Whether lower was given. */
74 unsigned int upper_given ; /**< @brief Whether upper was given. */
75 unsigned int fg_given ; /**< @brief Whether fg was given. */
76 unsigned int bg_given ; /**< @brief Whether bg was given. */
77 unsigned int mode_given ; /**< @brief Whether mode was given. */
79 char **inputs ; /**< @brief unamed options (options without names) */
80 unsigned inputs_num ; /**< @brief unamed options number */
83 /** @brief The additional parameters to pass to parser functions */
84 struct cmdline_parser_clitkBinarizeImage_params
86 int override; /**< @brief whether to override possibly already present options (default 0) */
87 int initialize; /**< @brief whether to initialize the option structure args_info_clitkBinarizeImage (default 1) */
88 int check_required; /**< @brief whether to check that all required options were provided (default 1) */
89 int check_ambiguity; /**< @brief whether to check for options already specified in the option structure args_info_clitkBinarizeImage (default 0) */
90 int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
93 /** @brief the purpose string of the program */
94 extern const char *args_info_clitkBinarizeImage_purpose;
95 /** @brief the usage string of the program */
96 extern const char *args_info_clitkBinarizeImage_usage;
97 /** @brief all the lines making the help output */
98 extern const char *args_info_clitkBinarizeImage_help[];
101 * The command line parser
102 * @param argc the number of command line options
103 * @param argv the command line options
104 * @param args_info the structure where option information will be stored
105 * @return 0 if everything went fine, NON 0 if an error took place
107 int cmdline_parser_clitkBinarizeImage (int argc, char * const *argv,
108 struct args_info_clitkBinarizeImage *args_info);
111 * The command line parser (version with additional parameters - deprecated)
112 * @param argc the number of command line options
113 * @param argv the command line options
114 * @param args_info the structure where option information will be stored
115 * @param override whether to override possibly already present options
116 * @param initialize whether to initialize the option structure my_args_info
117 * @param check_required whether to check that all required options were provided
118 * @return 0 if everything went fine, NON 0 if an error took place
119 * @deprecated use cmdline_parser_clitkBinarizeImage_ext() instead
121 int cmdline_parser_clitkBinarizeImage2 (int argc, char * const *argv,
122 struct args_info_clitkBinarizeImage *args_info,
123 int override, int initialize, int check_required);
126 * The command line parser (version with additional parameters)
127 * @param argc the number of command line options
128 * @param argv the command line options
129 * @param args_info the structure where option information will be stored
130 * @param params additional parameters for the parser
131 * @return 0 if everything went fine, NON 0 if an error took place
133 int cmdline_parser_clitkBinarizeImage_ext (int argc, char * const *argv,
134 struct args_info_clitkBinarizeImage *args_info,
135 struct cmdline_parser_clitkBinarizeImage_params *params);
138 * Save the contents of the option struct into an already open FILE stream.
139 * @param outfile the stream where to dump options
140 * @param args_info the option struct to dump
141 * @return 0 if everything went fine, NON 0 if an error took place
143 int cmdline_parser_clitkBinarizeImage_dump(FILE *outfile,
144 struct args_info_clitkBinarizeImage *args_info);
147 * Save the contents of the option struct into a (text) file.
148 * This file can be read by the config file parser (if generated by gengetopt)
149 * @param filename the file where to save
150 * @param args_info the option struct to save
151 * @return 0 if everything went fine, NON 0 if an error took place
153 int cmdline_parser_clitkBinarizeImage_file_save(const char *filename,
154 struct args_info_clitkBinarizeImage *args_info);
159 void cmdline_parser_clitkBinarizeImage_print_help(void);
163 void cmdline_parser_clitkBinarizeImage_print_version(void);
166 * Initializes all the fields a cmdline_parser_clitkBinarizeImage_params structure
167 * to their default values
168 * @param params the structure to initialize
170 void cmdline_parser_clitkBinarizeImage_params_init(struct cmdline_parser_clitkBinarizeImage_params *params);
173 * Allocates dynamically a cmdline_parser_clitkBinarizeImage_params structure and initializes
174 * all its fields to their default values
175 * @return the created and initialized cmdline_parser_clitkBinarizeImage_params structure
177 struct cmdline_parser_clitkBinarizeImage_params *cmdline_parser_clitkBinarizeImage_params_create(void);
180 * Initializes the passed args_info_clitkBinarizeImage structure's fields
181 * (also set default values for options that have a default)
182 * @param args_info the structure to initialize
184 void cmdline_parser_clitkBinarizeImage_init (struct args_info_clitkBinarizeImage *args_info);
186 * Deallocates the string fields of the args_info_clitkBinarizeImage structure
187 * (but does not deallocate the structure itself)
188 * @param args_info the structure to deallocate
190 void cmdline_parser_clitkBinarizeImage_free (struct args_info_clitkBinarizeImage *args_info);
193 * The config file parser (deprecated version)
194 * @param filename the name of the config file
195 * @param args_info the structure where option information will be stored
196 * @param override whether to override possibly already present options
197 * @param initialize whether to initialize the option structure my_args_info
198 * @param check_required whether to check that all required options were provided
199 * @return 0 if everything went fine, NON 0 if an error took place
200 * @deprecated use cmdline_parser_clitkBinarizeImage_config_file() instead
202 int cmdline_parser_clitkBinarizeImage_configfile (char * const filename,
203 struct args_info_clitkBinarizeImage *args_info,
204 int override, int initialize, int check_required);
207 * The config file parser
208 * @param filename the name of the config file
209 * @param args_info the structure where option information will be stored
210 * @param params additional parameters for the parser
211 * @return 0 if everything went fine, NON 0 if an error took place
213 int cmdline_parser_clitkBinarizeImage_config_file (char * const filename,
214 struct args_info_clitkBinarizeImage *args_info,
215 struct cmdline_parser_clitkBinarizeImage_params *params);
218 * Checks that all the required options were specified
219 * @param args_info the structure to check
220 * @param prog_name the name of the program that will be used to print
224 int cmdline_parser_clitkBinarizeImage_required (struct args_info_clitkBinarizeImage *args_info,
225 const char *prog_name);
227 extern char *cmdline_parser_clitkBinarizeImage_mode_values[] ; /**< @brief Possible values for mode. */
232 #endif /* __cplusplus */
233 #endif /* CLITKBINARIZEIMAGE_GGO_H */