]> Creatis software - clitk.git/blob - vv/tools_ggo/clitkCropImage_ggo.h
Merge branch 'master' of git.creatis.insa-lyon.fr:clitk
[clitk.git] / vv / tools_ggo / clitkCropImage_ggo.h
1 /** @file clitkCropImage_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 */
7
8 #ifndef CLITKCROPIMAGE_GGO_H
9 #define CLITKCROPIMAGE_GGO_H
10
11 /* If we use autoconf.  */
12 #ifdef HAVE_CONFIG_H
13 #include "config.h"
14 #endif
15
16 #include <stdio.h> /* for FILE */
17
18 #ifdef __cplusplus
19 extern "C" {
20 #endif /* __cplusplus */
21
22 #ifndef CMDLINE_PARSER_CLITKCROPIMAGE_PACKAGE
23 /** @brief the program name */
24 #define CMDLINE_PARSER_CLITKCROPIMAGE_PACKAGE "clitkCropImage"
25 #endif
26
27 #ifndef CMDLINE_PARSER_CLITKCROPIMAGE_VERSION
28 /** @brief the program version */
29 #define CMDLINE_PARSER_CLITKCROPIMAGE_VERSION "1.0"
30 #endif
31
32 /** @brief Where the command line options are stored */
33 struct args_info_clitkCropImage
34 {
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 imagetypes_flag;  /**< @brief Display allowed image types (default=off).  */
41   const char *imagetypes_help; /**< @brief Display allowed image types help description.  */
42   int verbose_flag;     /**< @brief Verbose (default=off).  */
43   const char *verbose_help; /**< @brief Verbose help description.  */
44   int verboseOption_flag;       /**< @brief Display options values (default=off).  */
45   const char *verboseOption_help; /**< @brief Display options values help description.  */
46   int verboseWarningOff_flag;   /**< @brief Do not display warning (default=off).  */
47   const char *verboseWarningOff_help; /**< @brief Do not display warning help description.  */
48   char * input_arg;     /**< @brief Input image filename.  */
49   char * input_orig;    /**< @brief Input image filename original value given at command line.  */
50   const char *input_help; /**< @brief Input image filename help description.  */
51   char * output_arg;    /**< @brief Output image filename.  */
52   char * output_orig;   /**< @brief Output image filename original value given at command line.  */
53   const char *output_help; /**< @brief Output image filename help description.  */
54   int* boundingBox_arg; /**< @brief Bounding box of the crop region (in 3D: =x1,x2,y1,y2,z1,z2).  */
55   char ** boundingBox_orig;     /**< @brief Bounding box of the crop region (in 3D: =x1,x2,y1,y2,z1,z2) original value given at command line.  */
56   int boundingBox_min; /**< @brief Bounding box of the crop region (in 3D: =x1,x2,y1,y2,z1,z2)'s minimum occurreces */
57   int boundingBox_max; /**< @brief Bounding box of the crop region (in 3D: =x1,x2,y1,y2,z1,z2)'s maximum occurreces */
58   const char *boundingBox_help; /**< @brief Bounding box of the crop region (in 3D: =x1,x2,y1,y2,z1,z2) help description.  */
59   int* lower_arg;       /**< @brief Size of the lower crop region (multiple values).  */
60   char ** lower_orig;   /**< @brief Size of the lower crop region (multiple values) original value given at command line.  */
61   int lower_min; /**< @brief Size of the lower crop region (multiple values)'s minimum occurreces */
62   int lower_max; /**< @brief Size of the lower crop region (multiple values)'s maximum occurreces */
63   const char *lower_help; /**< @brief Size of the lower crop region (multiple values) help description.  */
64   int* upper_arg;       /**< @brief Size of the upper crop region (multiple values).  */
65   char ** upper_orig;   /**< @brief Size of the upper crop region (multiple values) original value given at command line.  */
66   int upper_min; /**< @brief Size of the upper crop region (multiple values)'s minimum occurreces */
67   int upper_max; /**< @brief Size of the upper crop region (multiple values)'s maximum occurreces */
68   const char *upper_help; /**< @brief Size of the upper crop region (multiple values) help description.  */
69   int origin_flag;      /**< @brief Set new origin to zero (default=off).  */
70   const char *origin_help; /**< @brief Set new origin to zero help description.  */
71   double BG_arg;        /**< @brief Background value in input. (default='0').  */
72   char * BG_orig;       /**< @brief Background value in input. original value given at command line.  */
73   const char *BG_help; /**< @brief Background value in input. help description.  */
74   char * like_arg;      /**< @brief Crop like this image (must have the same spacing.  */
75   char * like_orig;     /**< @brief Crop like this image (must have the same spacing original value given at command line.  */
76   const char *like_help; /**< @brief Crop like this image (must have the same spacing help description.  */
77   double BGLike_arg;    /**< @brief Background value in output (if like larger) (default='0').  */
78   char * BGLike_orig;   /**< @brief Background value in output (if like larger) original value given at command line.  */
79   const char *BGLike_help; /**< @brief Background value in output (if like larger) help description.  */
80   
81   unsigned int help_given ;     /**< @brief Whether help was given.  */
82   unsigned int version_given ;  /**< @brief Whether version was given.  */
83   unsigned int config_given ;   /**< @brief Whether config was given.  */
84   unsigned int imagetypes_given ;       /**< @brief Whether imagetypes was given.  */
85   unsigned int verbose_given ;  /**< @brief Whether verbose was given.  */
86   unsigned int verboseOption_given ;    /**< @brief Whether verboseOption was given.  */
87   unsigned int verboseWarningOff_given ;        /**< @brief Whether verboseWarningOff was given.  */
88   unsigned int input_given ;    /**< @brief Whether input was given.  */
89   unsigned int output_given ;   /**< @brief Whether output was given.  */
90   unsigned int boundingBox_given ;      /**< @brief Whether boundingBox was given.  */
91   unsigned int lower_given ;    /**< @brief Whether lower was given.  */
92   unsigned int upper_given ;    /**< @brief Whether upper was given.  */
93   unsigned int origin_given ;   /**< @brief Whether origin was given.  */
94   unsigned int BG_given ;       /**< @brief Whether BG was given.  */
95   unsigned int like_given ;     /**< @brief Whether like was given.  */
96   unsigned int BGLike_given ;   /**< @brief Whether BGLike was given.  */
97
98   char **inputs ; /**< @brief unamed options (options without names) */
99   unsigned inputs_num ; /**< @brief unamed options number */
100 } ;
101
102 /** @brief The additional parameters to pass to parser functions */
103 struct cmdline_parser_clitkCropImage_params
104 {
105   int override; /**< @brief whether to override possibly already present options (default 0) */
106   int initialize; /**< @brief whether to initialize the option structure args_info_clitkCropImage (default 1) */
107   int check_required; /**< @brief whether to check that all required options were provided (default 1) */
108   int check_ambiguity; /**< @brief whether to check for options already specified in the option structure args_info_clitkCropImage (default 0) */
109   int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
110 } ;
111
112 /** @brief the purpose string of the program */
113 extern const char *args_info_clitkCropImage_purpose;
114 /** @brief the usage string of the program */
115 extern const char *args_info_clitkCropImage_usage;
116 /** @brief all the lines making the help output */
117 extern const char *args_info_clitkCropImage_help[];
118
119 /**
120  * The command line parser
121  * @param argc the number of command line options
122  * @param argv the command line options
123  * @param args_info the structure where option information will be stored
124  * @return 0 if everything went fine, NON 0 if an error took place
125  */
126 int cmdline_parser_clitkCropImage (int argc, char * const *argv,
127   struct args_info_clitkCropImage *args_info);
128
129 /**
130  * The command line parser (version with additional parameters - deprecated)
131  * @param argc the number of command line options
132  * @param argv the command line options
133  * @param args_info the structure where option information will be stored
134  * @param override whether to override possibly already present options
135  * @param initialize whether to initialize the option structure my_args_info
136  * @param check_required whether to check that all required options were provided
137  * @return 0 if everything went fine, NON 0 if an error took place
138  * @deprecated use cmdline_parser_clitkCropImage_ext() instead
139  */
140 int cmdline_parser_clitkCropImage2 (int argc, char * const *argv,
141   struct args_info_clitkCropImage *args_info,
142   int override, int initialize, int check_required);
143
144 /**
145  * The command line parser (version with additional parameters)
146  * @param argc the number of command line options
147  * @param argv the command line options
148  * @param args_info the structure where option information will be stored
149  * @param params additional parameters for the parser
150  * @return 0 if everything went fine, NON 0 if an error took place
151  */
152 int cmdline_parser_clitkCropImage_ext (int argc, char * const *argv,
153   struct args_info_clitkCropImage *args_info,
154   struct cmdline_parser_clitkCropImage_params *params);
155
156 /**
157  * Save the contents of the option struct into an already open FILE stream.
158  * @param outfile the stream where to dump options
159  * @param args_info the option struct to dump
160  * @return 0 if everything went fine, NON 0 if an error took place
161  */
162 int cmdline_parser_clitkCropImage_dump(FILE *outfile,
163   struct args_info_clitkCropImage *args_info);
164
165 /**
166  * Save the contents of the option struct into a (text) file.
167  * This file can be read by the config file parser (if generated by gengetopt)
168  * @param filename the file where to save
169  * @param args_info the option struct to save
170  * @return 0 if everything went fine, NON 0 if an error took place
171  */
172 int cmdline_parser_clitkCropImage_file_save(const char *filename,
173   struct args_info_clitkCropImage *args_info);
174
175 /**
176  * Print the help
177  */
178 void cmdline_parser_clitkCropImage_print_help(void);
179 /**
180  * Print the version
181  */
182 void cmdline_parser_clitkCropImage_print_version(void);
183
184 /**
185  * Initializes all the fields a cmdline_parser_clitkCropImage_params structure 
186  * to their default values
187  * @param params the structure to initialize
188  */
189 void cmdline_parser_clitkCropImage_params_init(struct cmdline_parser_clitkCropImage_params *params);
190
191 /**
192  * Allocates dynamically a cmdline_parser_clitkCropImage_params structure and initializes
193  * all its fields to their default values
194  * @return the created and initialized cmdline_parser_clitkCropImage_params structure
195  */
196 struct cmdline_parser_clitkCropImage_params *cmdline_parser_clitkCropImage_params_create(void);
197
198 /**
199  * Initializes the passed args_info_clitkCropImage structure's fields
200  * (also set default values for options that have a default)
201  * @param args_info the structure to initialize
202  */
203 void cmdline_parser_clitkCropImage_init (struct args_info_clitkCropImage *args_info);
204 /**
205  * Deallocates the string fields of the args_info_clitkCropImage structure
206  * (but does not deallocate the structure itself)
207  * @param args_info the structure to deallocate
208  */
209 void cmdline_parser_clitkCropImage_free (struct args_info_clitkCropImage *args_info);
210
211 /**
212  * The config file parser (deprecated version)
213  * @param filename the name of the config file
214  * @param args_info the structure where option information will be stored
215  * @param override whether to override possibly already present options
216  * @param initialize whether to initialize the option structure my_args_info
217  * @param check_required whether to check that all required options were provided
218  * @return 0 if everything went fine, NON 0 if an error took place
219  * @deprecated use cmdline_parser_clitkCropImage_config_file() instead
220  */
221 int cmdline_parser_clitkCropImage_configfile (char * const filename,
222   struct args_info_clitkCropImage *args_info,
223   int override, int initialize, int check_required);
224
225 /**
226  * The config file parser
227  * @param filename the name of the config file
228  * @param args_info the structure where option information will be stored
229  * @param params additional parameters for the parser
230  * @return 0 if everything went fine, NON 0 if an error took place
231  */
232 int cmdline_parser_clitkCropImage_config_file (char * const filename,
233   struct args_info_clitkCropImage *args_info,
234   struct cmdline_parser_clitkCropImage_params *params);
235
236 /**
237  * Checks that all the required options were specified
238  * @param args_info the structure to check
239  * @param prog_name the name of the program that will be used to print
240  *   possible errors
241  * @return
242  */
243 int cmdline_parser_clitkCropImage_required (struct args_info_clitkCropImage *args_info,
244   const char *prog_name);
245
246
247 #ifdef __cplusplus
248 }
249 #endif /* __cplusplus */
250 #endif /* CLITKCROPIMAGE_GGO_H */