Changeset 3375 for trunk/stac/src/stac.c
- Timestamp:
- Mar 4, 2005, 11:37:01 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/stac/src/stac.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/stac/src/stac.c
r2897 r3375 77 77 78 78 #ifdef TESTING 79 char prefile[MAXCHAR]; // Filename of precombined image 80 sprintf(prefile,"%s.pre",config->output); 81 psImageWriteSection(combined,0,0,0,NULL,0,prefile); 79 char preName[MAXCHAR]; // Filename of precombined image 80 sprintf(preName,"%s.pre",config->output); 81 psFits *preFile = psFitsAlloc(preName); 82 if (!psFitsWriteImage(preFile, NULL, combined, 0, NULL)) { 83 psErrorStackPrint(stderr, "Unable to write image: %s\n", preName); 84 } 85 psTrace("stac", 1, "Pre-combined image written to %s\n", preName); 86 psFree(preFile); 82 87 #endif 83 88 … … 89 94 ((psImage*)(inputs->data[i]))->numRows); 90 95 #ifdef TESTING 91 char regionFile[MAXCHAR]; // Filename of region image 92 sprintf(regionFile,"%s.region",config->inputs->data[i]); 93 psImageWriteSection(regions->data[i], 0, 0, 0, NULL, 0, regionFile); 96 char regionName[MAXCHAR]; // Filename of region image 97 sprintf(regionName,"%s.region",config->inputs->data[i]); 98 psFits *regionFile = psFitsAlloc(regionName); 99 if (!psFitsWriteImage(regionFile, NULL, regions->data[i], 0, NULL)) { 100 psErrorStackPrint(stderr, "Unable to write image: %s\n", regionName); 101 } 102 psTrace("stac", 1, "Region image written to %s\n", regionName); 103 psFree(regionFile); 94 104 #endif 95 105 } … … 122 132 123 133 // Write output image 124 psImageWriteSection(combined,0,0,0,NULL,0,config->output); 134 psFits *outFile = psFitsAlloc(config->output); 135 if (!psFitsWriteImage(outFile, NULL, combined, 0, NULL)) { 136 psErrorStackPrint(stderr, "Unable to write image: %s\n", config->output); 137 } 138 psTrace("stac", 1, "Combined image written to %s\n", config->output); 139 psFree(outFile); 125 140 126 141 // Free everything I've used
Note:
See TracChangeset
for help on using the changeset viewer.
