Changeset 17255 for trunk/ppStack/src/ppStackArguments.c
- Timestamp:
- Mar 31, 2008, 3:46:38 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ppStack/src/ppStackArguments.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStack/src/ppStackArguments.c
r17006 r17255 83 83 } 84 84 85 // Get a statistic name from the command-line or recipe, and add the enum to the arguments 86 #define VALUE_ARG_RECIPE_STAT(ARGNAME, RECIPENAME) { \ 87 const char *stat = psMetadataLookupStr(NULL, arguments, ARGNAME); \ 88 if (!stat) { \ 89 stat = psMetadataLookupStr(NULL, recipe, RECIPENAME); \ 90 if (!stat) { \ 91 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Unable to find %s in recipe %s", \ 92 RECIPENAME, PPSTACK_RECIPE); \ 93 goto ERROR; \ 94 } \ 95 } \ 96 psMetadataAddS32(config->arguments, PS_LIST_TAIL, RECIPENAME, 0, NULL, psStatsOptionFromString(stat)); \ 97 } 98 85 99 // Get a string value from the command-line and add it to the target 86 100 static bool valueArgStr(psMetadata *arguments, // Command-line arguments … … 141 155 psMetadataAddBool(arguments, PS_LIST_TAIL, "-variance", 0, "Use variance for rejection?", false); 142 156 psMetadataAddBool(arguments, PS_LIST_TAIL, "-safe", 0, "Play safe with small numbers of pixels to combine?", false); 157 psMetadataAddBool(arguments, PS_LIST_TAIL, "-renorm", 0, "Renormalise variance maps?", false); 158 psMetadataAddStr(arguments, PS_LIST_TAIL, "-renorm-mean", 0, "Statistic for mean in renormalisation", NULL); 159 psMetadataAddStr(arguments, PS_LIST_TAIL, "-renorm-stdev", 0, "Statistic for stdev in renormalisation", NULL); 160 psMetadataAddS32(arguments, PS_LIST_TAIL, "-renorm-width", 0, "Width of renormalisation boxes", 0); 143 161 psMetadataAddStr(arguments, PS_LIST_TAIL, "-temp-image", 0, "Suffix for temporary images", NULL); 144 162 psMetadataAddStr(arguments, PS_LIST_TAIL, "-temp-mask", 0, "Suffix for temporary masks", NULL); … … 208 226 } 209 227 228 if (psMetadataLookupBool(NULL, arguments, "-renorm") || 229 psMetadataLookupBool(NULL, recipe, "RENORM")) { 230 psMetadataAddBool(config->arguments, PS_LIST_TAIL, "RENORM", 0, "Renormalise variance maps?", true); 231 } 232 VALUE_ARG_RECIPE_INT("-renorm-width", "RENORM.WIDTH", S32, 0); 233 VALUE_ARG_RECIPE_STAT("-renorm-mean", "RENORM.MEAN"); 234 VALUE_ARG_RECIPE_STAT("-renorm-stdev", "RENORM.STDEV"); 235 210 236 valueArgRecipeStr(arguments, recipe, "-temp-image", "TEMP.IMAGE", config->arguments); 211 237 valueArgRecipeStr(arguments, recipe, "-temp-mask", "TEMP.MASK", config->arguments); … … 218 244 } 219 245 220 221 246 psTrace("ppStack", 1, "Done reading command-line arguments\n"); 222 247 psFree(arguments); … … 227 252 return false; 228 253 } 229 230
Note:
See TracChangeset
for help on using the changeset viewer.
