Changeset 2204 for trunk/psLib/src/image/psImageIO.c
- Timestamp:
- Oct 26, 2004, 2:57:34 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/image/psImageIO.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/image/psImageIO.c
r1941 r2204 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.1 2$ $Name: not supported by cvs2svn $10 * @date $Date: 2004-10- 02 02:08:00$9 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2004-10-27 00:57:31 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 15 15 #include <fitsio.h> 16 16 #include <unistd.h> 17 #include <stdbool.h>18 17 19 18 #include "psImageIO.h" … … 24 23 25 24 psImage* psImageReadSection(psImage* output, 26 intcol,27 introw,28 intnumCols,29 intnumRows,30 intz,25 psS32 col, 26 psS32 row, 27 psS32 numCols, 28 psS32 numRows, 29 psS32 z, 31 30 char *extname, 32 intextnum,31 psS32 extnum, 33 32 char *filename) 34 33 { 35 34 fitsfile *fptr = NULL; /* Pointer to the FITS file */ 36 intstatus = 0; /* CFITSIO file vars */37 intnAxis = 0;38 intanynull = 0;39 intbitPix = 0; /* Pixel type */40 longnAxes[3];41 longfirstPixel[3]; /* lower-left corner of image subset */42 longlastPixel[3]; /* upper-right corner of image subset */43 longincrement[3]; /* increment for image subset */35 psS32 status = 0; /* CFITSIO file vars */ 36 psS32 nAxis = 0; 37 psS32 anynull = 0; 38 psS32 bitPix = 0; /* Pixel type */ 39 psS64 nAxes[3]; 40 psS64 firstPixel[3]; /* lower-left corner of image subset */ 41 psS64 lastPixel[3]; /* upper-right corner of image subset */ 42 psS64 increment[3]; /* increment for image subset */ 44 43 char fitsErr[80] = ""; /* CFITSIO error message string */ 45 inthduType = IMAGE_HDU;46 intfitsDatatype = 0;47 intdatatype = 0;44 psS32 hduType = IMAGE_HDU; 45 psS32 fitsDatatype = 0; 46 psS32 datatype = 0; 48 47 49 48 if (filename == NULL) { … … 228 227 } 229 228 230 bool psImageWriteSection(psImage* input,231 intcol0,232 introw0,233 intz,234 char *extname,235 intextnum,236 char *filename)229 psBool psImageWriteSection(psImage* input, 230 psS32 col0, 231 psS32 row0, 232 psS32 z, 233 char *extname, 234 psS32 extnum, 235 char *filename) 237 236 { 238 intnumCols = 0;239 intnumRows = 0;240 241 intstatus = 0; /* CFITSIO status */237 psS32 numCols = 0; 238 psS32 numRows = 0; 239 240 psS32 status = 0; /* CFITSIO status */ 242 241 fitsfile *fptr = NULL; /* pointer to the FITS file */ 243 longnAxes[3]; /* Image axis vars */244 longfirstPixel[3]; /* First Pixel to read */245 longlastPixel[3]; /* Last Pixel to read */242 psS64 nAxes[3]; /* Image axis vars */ 243 psS64 firstPixel[3]; /* First Pixel to read */ 244 psS64 lastPixel[3]; /* Last Pixel to read */ 246 245 char fitsErr[80]; /* FITSIO message string */ 247 intdatatype = 0; /* the datatype of the image */248 intbitPix = 0; /* FITS bitPix value */249 inthduType = IMAGE_HDU; /* the HDU type (image,table, etc.) */246 psS32 datatype = 0; /* the datatype of the image */ 247 psS32 bitPix = 0; /* FITS bitPix value */ 248 psS32 hduType = IMAGE_HDU; /* the HDU type (image,table, etc.) */ 250 249 double bscale = 1.0; 251 250 double bzero = 0.0; 252 bool createNewHDU = false;251 psBool createNewHDU = false; 253 252 254 253 /* need a valid image to write */ … … 336 335 } 337 336 } else { 338 intnumHDUs = 0;337 psS32 numHDUs = 0; 339 338 340 339 fits_get_num_hdus(fptr, &numHDUs, &status);
Note:
See TracChangeset
for help on using the changeset viewer.
