- Timestamp:
- Jan 29, 2009, 3:39:49 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20081230/ppArith/src/ppArithArguments.c
r16189 r21229 1 /** @file ppArithArguments.c 2 * 3 * @brief 4 * 5 * @ingroup ppArith 6 * 7 * @author IfA 8 * @version $Revision: 1.4.30.1 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-01-30 01:38:25 $ 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 */ 12 1 13 #ifdef HAVE_CONFIG_H 2 14 #include <config.h> … … 35 47 ) 36 48 { 37 psString value = psMetadataLookupStr(NULL, arguments, argName); / / Value of interest49 psString value = psMetadataLookupStr(NULL, arguments, argName); /** Value of interest */ 38 50 if (value && strlen(value) > 0) { 39 51 return psMetadataAddStr(target, PS_LIST_TAIL, mdName, 0, NULL, value); … … 42 54 } 43 55 44 // Add a single filename to the arguments as an array, so that it can be used with pmFPAfileBindFromArgs, etc 56 /** 57 * \fn fileList 58 * Add a single filename to the arguments as an array, so that it can be used with pmFPAfileBindFromArgs, etc 59 */ 45 60 static void fileList(const char *file, // The symbolic name for the file 46 61 const char *name, // The name of the file … … 60 75 assert(config); 61 76 62 psMetadata *arguments = psMetadataAlloc(); / / Command-line arguments77 psMetadata *arguments = psMetadataAlloc(); /** Command-line arguments */ 63 78 psMetadataAddStr(arguments, PS_LIST_TAIL, "-file1", 0, "First image", NULL); 64 79 psMetadataAddStr(arguments, PS_LIST_TAIL, "-op", 0, "Operation to perform", NULL); … … 74 89 psMetadataAddBool(config->arguments, PS_LIST_TAIL, "MASK", 0, "Produce a mask image?", isMask); 75 90 const char *inFilerule = isMask ? "PPARITH.INPUT.MASK" : "PPARITH.INPUT.IMAGE"; // Input file rule 76 const char *outFilerule = isMask ? "PPARITH.OUTPUT.MASK" : "PPARITH.OUTPUT.IMAGE"; / / Output file rule91 const char *outFilerule = isMask ? "PPARITH.OUTPUT.MASK" : "PPARITH.OUTPUT.IMAGE"; /** Output file rule */ 77 92 psMetadataAddStr(config->arguments, PS_LIST_TAIL, "FILERULE.INPUT", 0, 78 93 "File rule for input", inFilerule); … … 80 95 "File rule for output", outFilerule); 81 96 82 bool status = false; / / Status for file definition97 bool status = false; /** Status for file definition */ 83 98 84 99 // First file 85 const char *name1 = psMetadataLookupStr(NULL, arguments, "-file1"); / / Name of first image100 const char *name1 = psMetadataLookupStr(NULL, arguments, "-file1"); /** Name of first image */ 86 101 if (!name1 || strlen(name1) == 0) { 87 102 psError(PS_ERR_UNEXPECTED_NULL, true, "No input image specified."); … … 100 115 101 116 // Second file is optional (won't be one for unary operations) 102 const char *name2 = psMetadataLookupStr(NULL, arguments, "-file2"); / / Name of second image117 const char *name2 = psMetadataLookupStr(NULL, arguments, "-file2"); /** Name of second image */ 103 118 if (name2 && strlen(name2) > 0) { 104 119 fileList("INPUT2", name2, "Name of the second input image", config);
Note:
See TracChangeset
for help on using the changeset viewer.
