Changeset 6771
- Timestamp:
- Apr 4, 2006, 12:06:11 PM (20 years ago)
- Location:
- trunk/stac/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/stac/src/calcGradient.c
r5743 r6771 16 16 17 17 // We only read PHUs --- not mucking around with extensions for now 18 psImage *image = psFitsReadImage( NULL,inFile, imageRegion, 0);18 psImage *image = psFitsReadImage(inFile, imageRegion, 0); 19 19 if (image == NULL) { 20 20 psErrorStackPrint(stderr,"Fatal error: Unable to read %s\n", inName); … … 46 46 47 47 psFits *outFile = psFitsOpen(outName, "w"); 48 if (!psFitsWriteImage(outFile, NULL, grad, 0 )) {48 if (!psFitsWriteImage(outFile, NULL, grad, 0, NULL)) { 49 49 psErrorStackPrint(stderr, "Unable to write image: %s\n", outName); 50 50 } -
trunk/stac/src/combine.c
r6330 r6771 58 58 59 59 psFits *outFile = psFitsOpen(config->outName, "w"); 60 if (!psFitsWriteImage(outFile, headers->data[0], combined, 0 )) {60 if (!psFitsWriteImage(outFile, headers->data[0], combined, 0, NULL)) { 61 61 psErrorStackPrint(stderr, "Unable to write image: %s\n", config->outName); 62 62 } -
trunk/stac/src/shift.c
r5743 r6771 90 90 psRegion imageRegion = {0, 0, 0, 0}; // Region of image to read 91 91 psMetadata *header = psFitsReadHeader(NULL, imageFile); // FITS header 92 psImage *image = psFitsReadImage( NULL,imageFile, imageRegion, 0);92 psImage *image = psFitsReadImage(imageFile, imageRegion, 0); 93 93 if (image == NULL) { 94 94 psErrorStackPrint(stderr, "Fatal error: Unable to read %s\n", inName); … … 155 155 psTrace("stac", 3, "Clipping %d NaN pixels to zero.\n", numPix); 156 156 } 157 if (!psFitsWriteImage(outFile, header, transformed->data[0], 0 )) {157 if (!psFitsWriteImage(outFile, header, transformed->data[0], 0, NULL)) { 158 158 psErrorStackPrint(stderr, "Unable to write image: %s\n", outName); 159 159 } -
trunk/stac/src/stac.c
r5745 r6771 160 160 image = psImageCopy(NULL, transformed->data[i], PS_TYPE_F32); 161 161 (void)psImageClipNaN(image, 0.0); 162 if (!psFitsWriteImage(shiftFile, headers->data[i], image, 0 )) {162 if (!psFitsWriteImage(shiftFile, headers->data[i], image, 0, NULL)) { 163 163 psErrorStackPrint(stderr, "Unable to write image: %s\n", shiftName); 164 164 } … … 266 266 psTrace("stac", 3, "Clipping %d NaN pixels to zero.\n", numPix); 267 267 } 268 if (!psFitsWriteImage(outFile, headers->data[0], combined, 0 )) {268 if (!psFitsWriteImage(outFile, headers->data[0], combined, 0, NULL)) { 269 269 psErrorStackPrint(stderr, "Unable to write image: %s\n", config->output); 270 270 } -
trunk/stac/src/stacRead.c
r6485 r6771 24 24 psTrace("stac.read.images", 2, "Reading input image %s....\n",filenames->data[i]); 25 25 psFits *imageFile = psFitsOpen(filenames->data[i], "r"); 26 if (!imageFile) { 27 psError(PS_ERR_IO, false, "Unable to open FITS file %s.\n", filenames->data[i]); 28 exit(EXIT_FAILURE); 29 } 26 30 // We only read PHUs --- not mucking around with extensions for now 27 31 if (headers) { 28 32 (*headers)->data[i] = psFitsReadHeader(NULL, imageFile); 29 33 } 30 psImage *image = psFitsReadImage( NULL,imageFile, imageRegion, 0);34 psImage *image = psFitsReadImage(imageFile, imageRegion, 0); 31 35 if (image == NULL) { 32 36 psErrorStackPrint(stderr,"Fatal error: Unable to read %s\n",filenames->data[i]); -
trunk/stac/src/sum.c
r5745 r6771 22 22 psFits *fits = psFitsOpen(inputNames->data[i], "r"); // FITS file 23 23 psRegion readRegion = {0, 0, 0, 0}; // Region to read 24 psImage *image = psFitsReadImage( NULL,fits, readRegion, 0);24 psImage *image = psFitsReadImage(fits, readRegion, 0); 25 25 if (numCols == 0 && numRows == 0) { 26 26 // First run through --- set the size, initialise the output, read the header … … 75 75 76 76 psFits *fits = psFitsOpen(outputName, "w"); 77 (void)psFitsWriteImage(fits, header, output, 0 );77 (void)psFitsWriteImage(fits, header, output, 0, NULL); 78 78 psFitsClose(fits); 79 79 psFree(output);
Note:
See TracChangeset
for help on using the changeset viewer.
