"Fossies" - the Fresh Open Source Software Archive 
Member "gnuastro-0.8/bin/convertt/args.h" (26 Dec 2018, 5843 Bytes) of package /linux/privat/gnuastro-0.8.tar.lz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "args.h" see the
Fossies "Dox" file reference documentation and the latest
Fossies "Diffs" side-by-side code changes report:
0.7_vs_0.8.
1 /*********************************************************************
2 ConvertType - Convert between various types of files.
3 ConvertType is part of GNU Astronomy Utilities (Gnuastro) package.
4
5 Original author:
6 Mohammad Akhlaghi <mohammad@akhlaghi.org>
7 Contributing author(s):
8 Copyright (C) 2016-2018, Free Software Foundation, Inc.
9
10 Gnuastro is free software: you can redistribute it and/or modify it
11 under the terms of the GNU General Public License as published by the
12 Free Software Foundation, either version 3 of the License, or (at your
13 option) any later version.
14
15 Gnuastro is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
22 **********************************************************************/
23 #ifndef ARGS_H
24 #define ARGS_H
25
26
27
28
29
30 /* Array of acceptable options. */
31 struct argp_option program_options[] =
32 {
33 /* Output */
34 {
35 "quality",
36 UI_KEY_QUALITY,
37 "INT",
38 0,
39 "Quality of output JPEG image (1 to 100).",
40 GAL_OPTIONS_GROUP_OUTPUT,
41 &p->quality,
42 GAL_TYPE_UINT8,
43 GAL_OPTIONS_RANGE_GT_0,
44 GAL_OPTIONS_NOT_MANDATORY,
45 GAL_OPTIONS_NOT_SET
46 },
47 {
48 "widthincm",
49 UI_KEY_WIDTHINCM,
50 "FLT",
51 0,
52 "Width in units of centimeters.",
53 GAL_OPTIONS_GROUP_OUTPUT,
54 &p->widthincm,
55 GAL_TYPE_FLOAT32,
56 GAL_OPTIONS_RANGE_GT_0,
57 GAL_OPTIONS_NOT_MANDATORY,
58 GAL_OPTIONS_NOT_SET
59 },
60 {
61 "borderwidth",
62 UI_KEY_BORDERWIDTH,
63 "INT",
64 0,
65 "EPS/PDF border width in units of 1/72 inch.",
66 GAL_OPTIONS_GROUP_OUTPUT,
67 &p->borderwidth,
68 GAL_TYPE_UINT32,
69 GAL_OPTIONS_RANGE_GE_0,
70 GAL_OPTIONS_NOT_MANDATORY,
71 GAL_OPTIONS_NOT_SET
72 },
73 {
74 "hex",
75 UI_KEY_HEX,
76 0,
77 0,
78 "Hexadecimal encoding in EPS. Default: ASCII85.",
79 GAL_OPTIONS_GROUP_OUTPUT,
80 &p->hex,
81 GAL_OPTIONS_NO_ARG_TYPE,
82 GAL_OPTIONS_RANGE_0_OR_1,
83 GAL_OPTIONS_NOT_MANDATORY,
84 GAL_OPTIONS_NOT_SET
85 },
86 {
87 "colormap",
88 UI_KEY_COLORMAP,
89 "STR[,FLT]",
90 0,
91 "Color map when only a single channel is given.",
92 GAL_OPTIONS_GROUP_OUTPUT,
93 &p->colormap,
94 GAL_OPTIONS_NO_ARG_TYPE,
95 GAL_OPTIONS_RANGE_0_OR_1,
96 GAL_OPTIONS_NOT_MANDATORY,
97 GAL_OPTIONS_NOT_SET,
98 gal_options_parse_csv_strings
99 },
100 {
101 "rgbtohsv",
102 UI_KEY_RGBTOHSV,
103 0,
104 0,
105 "Convert RGB input into HSV (in FITS output)",
106 GAL_OPTIONS_GROUP_OUTPUT,
107 &p->rgbtohsv,
108 GAL_OPTIONS_NO_ARG_TYPE,
109 GAL_OPTIONS_RANGE_0_OR_1,
110 GAL_OPTIONS_NOT_MANDATORY,
111 GAL_OPTIONS_NOT_SET
112 },
113
114
115
116
117
118
119 {
120 0, 0, 0, 0,
121 "Flux:",
122 UI_GROUP_FLUX
123 },
124 {
125 "fluxlow",
126 UI_KEY_FLUXLOW,
127 "FLT",
128 0,
129 "Lower flux truncation value.",
130 UI_GROUP_FLUX,
131 &p->fluxlowstr,
132 GAL_TYPE_STRING,
133 GAL_OPTIONS_RANGE_ANY,
134 GAL_OPTIONS_NOT_MANDATORY,
135 GAL_OPTIONS_NOT_SET
136 },
137 {
138 "fluxhigh",
139 UI_KEY_FLUXHIGH,
140 "FLT",
141 0,
142 "Higher flux truncation value.",
143 UI_GROUP_FLUX,
144 &p->fluxhighstr,
145 GAL_TYPE_STRING,
146 GAL_OPTIONS_RANGE_ANY,
147 GAL_OPTIONS_NOT_MANDATORY,
148 GAL_OPTIONS_NOT_SET
149 },
150 {
151 "maxbyte",
152 UI_KEY_MAXBYTE,
153 "INT",
154 0,
155 "Maximum byte value for all color channels.",
156 UI_GROUP_FLUX,
157 &p->maxbyte,
158 GAL_TYPE_UINT8,
159 GAL_OPTIONS_RANGE_GE_0,
160 GAL_OPTIONS_NOT_MANDATORY,
161 GAL_OPTIONS_NOT_SET
162 },
163 {
164 "flminbyte",
165 UI_KEY_FLMINBYTE,
166 0,
167 0,
168 "Set value of fluxlow as the minimum byte value.",
169 UI_GROUP_FLUX,
170 &p->flminbyte,
171 GAL_OPTIONS_NO_ARG_TYPE,
172 GAL_OPTIONS_RANGE_0_OR_1,
173 GAL_OPTIONS_NOT_MANDATORY,
174 GAL_OPTIONS_NOT_SET
175 },
176 {
177 "fhmaxbyte",
178 UI_KEY_FHMAXBYTE,
179 0,
180 0,
181 "Set value of fluxhigh as the maximum byte value.",
182 UI_GROUP_FLUX,
183 &p->fhmaxbyte,
184 GAL_OPTIONS_NO_ARG_TYPE,
185 GAL_OPTIONS_RANGE_0_OR_1,
186 GAL_OPTIONS_NOT_MANDATORY,
187 GAL_OPTIONS_NOT_SET
188 },
189 {
190 "change",
191 UI_KEY_CHANGE,
192 "STR",
193 0,
194 "Change pixel values `from_1:to_1,from_2:to_2`.",
195 UI_GROUP_FLUX,
196 &p->changestr,
197 GAL_TYPE_STRING,
198 GAL_OPTIONS_RANGE_ANY,
199 GAL_OPTIONS_NOT_MANDATORY,
200 GAL_OPTIONS_NOT_SET
201 },
202 {
203 "changeaftertrunc",
204 UI_KEY_CHANGEAFTERTRUNC,
205 0,
206 0,
207 "First truncate then change pixel values.",
208 UI_GROUP_FLUX,
209 &p->changeaftertrunc,
210 GAL_OPTIONS_NO_ARG_TYPE,
211 GAL_OPTIONS_RANGE_0_OR_1,
212 GAL_OPTIONS_NOT_MANDATORY,
213 GAL_OPTIONS_NOT_SET
214 },
215 {
216 "invert",
217 UI_KEY_INVERT,
218 0,
219 0,
220 "Invert the values in JPEG and EPS/PDF.",
221 UI_GROUP_FLUX,
222 &p->invert,
223 GAL_OPTIONS_NO_ARG_TYPE,
224 GAL_OPTIONS_RANGE_0_OR_1,
225 GAL_OPTIONS_NOT_MANDATORY,
226 GAL_OPTIONS_NOT_SET
227 },
228
229
230
231 {0}
232 };
233
234
235
236
237
238 /* Define the child argp structure. */
239 struct argp
240 gal_options_common_child = {gal_commonopts_options,
241 gal_options_common_argp_parse,
242 NULL, NULL, NULL, NULL, NULL};
243
244 /* Use the child argp structure in list of children (only one for now). */
245 struct argp_child
246 children[]=
247 {
248 {&gal_options_common_child, 0, NULL, 0},
249 {0, 0, 0, 0}
250 };
251
252 /* Set all the necessary argp parameters. */
253 struct argp
254 thisargp = {program_options, parse_opt, args_doc, doc, children, NULL, NULL};
255 #endif