d2::image::defined_scale_by_half(): Replace incorrect operators for geometric mean.
[Ale.git] / ui / input.cc
blob3f3d558c7039dc5d6f3de964b327288d24560fd9
1 // Copyright 2006 David Hilvert <dhilvert@auricle.dyndns.org>,
2 // <dhilvert@ugcs.caltech.edu>
4 /* This file is part of the Anti-Lamenessing Engine.
6 The Anti-Lamenessing Engine is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 The Anti-Lamenessing Engine is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with the Anti-Lamenessing Engine; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #include "input.h"
24 * See input.h for details on these variables.
26 std::stack<input::environment *> input::environment::environment_stack;
27 std::set<input::environment *> input::environment::environment_set;
29 int input::global_options = 1;
31 input::environment *input::genv = NULL;
34 * List of options that can be used as nonglobals.
37 const char *input::supported_nonglobal_option_table[] = {
38 "mc",
39 "mcd-removal",
40 "threads",
41 "per-cpu",
42 "perturb-upper",
43 NULL
46 const char *input::focus_prefixes[] = {
47 "ci=",
48 "fr=",
49 "ht=",
50 "vt=",
51 "sy=",
52 "ey=",
53 "sx=",
54 "ex=",
55 "sd=",
56 "ed=",
57 "ap=",
58 "sc=",
59 "sr=",
60 "fs=",
61 NULL
65 * Entries in this table are:
67 * name, map_name, map_value, arg_count, multi
69 * The table must be terminated with name of NULL.
72 input::simple_option input::simple_option_table[] = {
73 { "q0", "default" },
74 { "q1", "default" },
75 { "q2", "default" },
76 { "qn", "default" },
77 { "qr", "default" },
79 { "8bpc", "bpc" },
80 { "16bpc", "bpc" },
82 { "plain", "format" },
83 { "raw", "format" },
84 { "auto", "format" },
86 { "align-all", "align" },
87 { "align-green", "align" },
88 { "align-sum", "align" },
90 { "translation", "transformation" },
91 { "euclidean", "transformation" },
92 { "projective", "transformation" },
94 { "identity", "transformation-default" },
95 { "follow", "transformation-default" },
97 { "perturb-output", "perturb" },
98 { "perturb-source", "perturb" },
100 { "fail-optimal", "fail" },
101 { "fail-default", "fail" },
103 { "profile" },
105 { "extend" },
106 { "no-extend", "extend", "0" },
108 { "mcd", "mc", "0" },
109 { "no-mc", "mc", "1" },
110 { "mc", "mc", "2", 1 },
111 { "mcd-removal", NULL, NULL, 1 },
113 { "threads", NULL, NULL, 1 },
114 { "per-cpu", NULL, NULL, 1 },
116 { "oc" },
117 { "no-oc", "oc", "0" },
119 { "gs", NULL, NULL, 1 },
120 { "gs-mo", NULL, NULL, 1 },
122 { "focus", "error" },
124 { "3ddp", NULL, NULL, 10, 1 },
125 { "3dvp", NULL, NULL, 10, 1 },
127 { "3dv", NULL, NULL, 2, 1 },
128 { "3dd", NULL, NULL, 2, 1 },
130 { "view-angle", NULL, NULL, 1 },
132 { "cpf-load", NULL, NULL, 1 },
134 { "ui", NULL, NULL, 1 },
136 { "3d-fmr", NULL, NULL, 1 },
138 { "3d-dmr", NULL, NULL, 1 },
140 { "et", NULL, NULL, 1 },
142 { "st", NULL, NULL, 1 },
144 { "di-lower", NULL, NULL, 1 },
146 { "rc", NULL, NULL, 1 },
148 { "do-try", NULL, NULL, 1 },
149 { "di-upper", NULL, NULL, 1 },
151 { "fc", NULL, NULL, 1 },
153 { "ecm", NULL, NULL, 1 },
154 { "acm", NULL, NULL, 1 },
156 { "def-nn", NULL, NULL, 1 },
158 { "fx", NULL, NULL, 1 },
160 { "tcem", NULL, NULL, 1 },
162 { "oui", NULL, NULL, 1 },
164 { "pa", NULL, NULL, 1 },
166 { "pc", NULL, NULL, 1 },
168 { "cw" },
169 { "no-cw", "cw", "0" },
171 { "wm", NULL, NULL, 3 },
173 { "fl", NULL, NULL, 3 },
175 { "wmx", NULL, NULL, 3 },
177 { "flshow", NULL, NULL, 1 },
179 { "3dpx", NULL, NULL, 6 },
181 { "ex", NULL, NULL, 6, 1 },
182 { "crop", NULL, NULL, 6, 1 },
183 { "fex", NULL, NULL, 6, 1 },
184 { "fcrop", NULL, NULL, 6, 1 },
185 { "exshow" },
187 { "wt", NULL, NULL, 1 },
188 { "3d-chain", NULL, NULL, 1 },
189 { "dchain", NULL, NULL, 1 },
190 { "achain", NULL, NULL, 1 },
191 { "afilter", NULL, NULL, 1 },
192 { "ochain", NULL, NULL, 2 },
194 { "visp", NULL, NULL, 5 },
195 { "cx", NULL, NULL, 1 },
196 { "no-cx", "cx", "0" },
198 { "ip", NULL, NULL, 0 },
200 { "bayer", NULL, NULL, 1 },
202 { "lpsf", NULL, NULL, 1 },
203 { "nlpsf", NULL, NULL, 1 },
204 { "psf-match", NULL, NULL, 6 },
206 { "device", NULL, NULL, 1 },
208 { "usm", NULL, NULL, 1 },
210 { "ipr", NULL, NULL, 1 },
212 { "cpp-err-median", "cpp-err", "median" },
213 { "cpp-err-mean", "cpp-err", "mean" },
215 { "vp-adjust" },
216 { "vp-noadjust", "vp-adjust", "0" },
218 { "vo-adjust" },
219 { "vo-noadjust", "vo-adjust", "0" },
221 { "ip-mean", "ip-statistic", "mean" },
222 { "ip-median", "ip-statistic", "median" },
224 { "ips", NULL, NULL, 1 },
226 { "ipc", NULL, NULL, 2 },
228 { "exp-extend" },
229 { "exp-noextend", "exp-extend", "0" },
231 { "exp-register" },
232 { "exp-noregister", "exp-register", "0" },
233 { "exp-meta-only", "exp-register", "2" },
235 { "drizzle-only" },
237 { "subspace-traverse" },
239 { "3d-filter" },
240 { "3d-nofilter", "3d-filter", "0" },
242 { "occ-norm" },
243 { "occ-nonorm", "occ-norm", "0" },
245 { "inc" },
246 { "no-inc", "inc", "0" },
248 { "exp-mult", NULL, NULL, 3 },
250 { "visp-scale", NULL, NULL, 1 },
252 { "scale", NULL, NULL, 1 },
254 { "metric", NULL, NULL, 1 },
256 { "threshold", NULL, NULL, 1 },
258 { "drizzle-diam", NULL, NULL, 1 },
260 { "perturb-upper", NULL, NULL, 1 },
261 { "perturb-lower", NULL, NULL, 1 },
263 { "stepsize", NULL, NULL, 1 },
265 { "va-upper", NULL, NULL, 1 },
266 { "cpp-upper", NULL, NULL, 1 },
267 { "cpp-lower", NULL, NULL, 1 },
268 { "hf-enhance", NULL, NULL, 1 },
269 { "rot-upper", NULL, NULL, 1 },
271 { "bda-mult", NULL, NULL, 1 },
272 { "bda-rate", NULL, NULL, 1 },
274 { "lod-max", NULL, NULL, 1 },
276 { "cpf-load", NULL, NULL, 1 },
277 { "model-load", NULL, NULL, 1 },
278 { "model-save", NULL, NULL, 1 },
279 { "trans-load", NULL, NULL, 1 },
280 { "trans-save", NULL, NULL, 1 },
281 { "3d-trans-load", NULL, NULL, 1 },
282 { "3d-trans-save", NULL, NULL, 1 },
285 * End of table.
288 { NULL }