d2::trans_multi: Add --mi option (useful for debugging multi-alignment
[Ale.git] / ui / input.cc
blob2dea80354ea6cb272463f77a0f3677f292001a1a
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 3 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 "threads",
40 "per-cpu",
41 "perturb-upper",
42 "ev",
43 "gs-mo",
44 "black",
45 "md",
46 "ma-cert",
47 "mi",
48 NULL
51 const char *input::focus_prefixes[] = {
52 "ci=",
53 "fr=",
54 "ht=",
55 "vt=",
56 "sy=",
57 "ey=",
58 "sx=",
59 "ex=",
60 "sd=",
61 "ed=",
62 "ap=",
63 "sc=",
64 "sr=",
65 "fs=",
66 NULL
70 * Entries in this table are:
72 * name, map_name, map_value, arg_count, multi
74 * The table must be terminated with name of NULL.
77 input::simple_option input::simple_option_table[] = {
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 { "mc", NULL, NULL, 1 },
110 { "cache", NULL, NULL, 1 },
111 { "resident", NULL, NULL, 1 },
113 { "ev", NULL, NULL, 1 },
114 { "black", NULL, NULL, 1 },
116 { "threads", NULL, NULL, 1 },
117 { "per-cpu", NULL, NULL, 1 },
119 { "oc" },
120 { "no-oc", "oc", "0" },
122 { "gs", NULL, NULL, 1 },
123 { "gs-mo", NULL, NULL, 1 },
125 { "md", NULL, NULL, 1 },
126 { "ma-cert", NULL, NULL, 1 },
127 { "mi", NULL, NULL, 1 },
129 { "focus", "error" },
131 { "3ddp", NULL, NULL, 10, 1 },
132 { "3dvp", NULL, NULL, 10, 1 },
134 { "3dv", NULL, NULL, 2, 1 },
135 { "3dd", NULL, NULL, 2, 1 },
137 { "view-angle", NULL, NULL, 1 },
139 { "cpf-load", NULL, NULL, 1 },
141 { "ui", NULL, NULL, 1 },
143 { "3d-fmr", NULL, NULL, 1 },
145 { "3d-dmr", NULL, NULL, 1 },
147 { "et", NULL, NULL, 1 },
149 { "st", NULL, NULL, 1 },
151 { "di-lower", NULL, NULL, 1 },
153 { "rc", NULL, NULL, 1 },
155 { "do-try", NULL, NULL, 1 },
156 { "di-upper", NULL, NULL, 1 },
158 { "fc", NULL, NULL, 1 },
160 { "ecm", NULL, NULL, 1 },
161 { "acm", NULL, NULL, 1 },
163 { "def-nn", NULL, NULL, 1 },
165 { "fx", NULL, NULL, 1 },
167 { "tcem", NULL, NULL, 1 },
169 { "oui", NULL, NULL, 1 },
171 { "pa", NULL, NULL, 1 },
173 { "pc", NULL, NULL, 1 },
175 { "cw" },
176 { "no-cw", "cw", "0" },
178 { "wm", NULL, NULL, 3 },
180 { "fl", NULL, NULL, 3 },
182 { "wmx", NULL, NULL, 3 },
184 { "flshow", NULL, NULL, 1 },
186 { "3dpx", NULL, NULL, 6 },
188 { "ex", NULL, NULL, 6, 1 },
189 { "crop", NULL, NULL, 6, 1 },
190 { "fex", NULL, NULL, 6, 1 },
191 { "fcrop", NULL, NULL, 6, 1 },
192 { "exshow" },
194 { "wt", NULL, NULL, 1 },
195 { "3d-chain", NULL, NULL, 1 },
196 { "dchain", NULL, NULL, 1 },
197 { "achain", NULL, NULL, 1 },
198 { "afilter", NULL, NULL, 1 },
199 { "ochain", NULL, NULL, 2 },
201 { "visp", NULL, NULL, 5 },
202 { "cx", NULL, NULL, 1 },
203 { "no-cx", "cx", "0" },
205 { "ip", NULL, NULL, 0 },
207 { "bayer", NULL, NULL, 1 },
209 { "lpsf", NULL, NULL, 1 },
210 { "nlpsf", NULL, NULL, 1 },
211 { "psf-match", NULL, NULL, 6 },
213 { "device", NULL, NULL, 1 },
215 { "usm", NULL, NULL, 1 },
217 { "ipr", NULL, NULL, 1 },
219 { "cpp-err-median", "cpp-err", "median" },
220 { "cpp-err-mean", "cpp-err", "mean" },
222 { "vp-adjust" },
223 { "vp-noadjust", "vp-adjust", "0" },
225 { "vo-adjust" },
226 { "vo-noadjust", "vo-adjust", "0" },
228 { "ip-mean", "ip-statistic", "mean" },
229 { "ip-median", "ip-statistic", "median" },
231 { "ip-wl", "ip-wl", "1", 1 },
232 { "ip-nowl", "ip-wl", "0" },
234 { "ips", NULL, NULL, 1 },
236 { "ipc", NULL, NULL, 2 },
238 { "exp-extend" },
239 { "exp-noextend", "exp-extend", "0" },
241 { "exp-register" },
242 { "exp-noregister", "exp-register", "0" },
243 { "exp-meta-only", "exp-register", "2" },
245 { "drizzle-only" },
247 { "subspace-traverse" },
249 { "3d-filter" },
250 { "3d-nofilter", "3d-filter", "0" },
252 { "occ-norm" },
253 { "occ-nonorm", "occ-norm", "0" },
255 { "inc" },
256 { "no-inc", "inc", "0" },
258 { "exp-mult", NULL, NULL, 3 },
260 { "visp-scale", NULL, NULL, 1 },
262 { "scale", NULL, NULL, 1 },
264 { "metric", NULL, NULL, 1 },
266 { "threshold", NULL, NULL, 1 },
268 { "drizzle-diam", NULL, NULL, 1 },
270 { "perturb-upper", NULL, NULL, 1 },
271 { "perturb-lower", NULL, NULL, 1 },
273 { "stepsize", NULL, NULL, 1 },
275 { "va-upper", NULL, NULL, 1 },
276 { "cpp-upper", NULL, NULL, 1 },
277 { "cpp-lower", NULL, NULL, 1 },
278 { "hf-enhance", NULL, NULL, 1 },
279 { "rot-upper", NULL, NULL, 1 },
281 { "bda-mult", NULL, NULL, 1 },
282 { "bda-rate", NULL, NULL, 1 },
284 { "lod-preferred", NULL, NULL, 1 },
285 { "min-dimension", NULL, NULL, 1 },
287 { "model-load", NULL, NULL, 1 },
288 { "model-save", NULL, NULL, 1 },
289 { "trans-load", NULL, NULL, 1 },
290 { "trans-save", NULL, NULL, 1 },
291 { "3d-trans-load", NULL, NULL, 1 },
292 { "3d-trans-save", NULL, NULL, 1 },
295 * End of table.
298 { NULL }