IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 26, 2004, 2:57:34 PM (22 years ago)
Author:
desonia
Message:

converted native C types to ps Types, where practical.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/image/psImageIO.c

    r1941 r2204  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.12 $ $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 $
    1111 *
    1212 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1515#include <fitsio.h>
    1616#include <unistd.h>
    17 #include <stdbool.h>
    1817
    1918#include "psImageIO.h"
     
    2423
    2524psImage* psImageReadSection(psImage* output,
    26                             int col,
    27                             int row,
    28                             int numCols,
    29                             int numRows,
    30                             int z,
     25                            psS32 col,
     26                            psS32 row,
     27                            psS32 numCols,
     28                            psS32 numRows,
     29                            psS32 z,
    3130                            char *extname,
    32                             int extnum,
     31                            psS32 extnum,
    3332                            char *filename)
    3433{
    3534    fitsfile *fptr = NULL;      /* Pointer to the FITS file */
    36     int status = 0;             /* CFITSIO file vars */
    37     int nAxis = 0;
    38     int anynull = 0;
    39     int bitPix = 0;             /* Pixel type */
    40     long nAxes[3];
    41     long firstPixel[3];         /* lower-left corner of image subset */
    42     long lastPixel[3];          /* upper-right corner of image subset */
    43     long increment[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 */
    4443    char fitsErr[80] = "";      /* CFITSIO error message string */
    45     int hduType = IMAGE_HDU;
    46     int fitsDatatype = 0;
    47     int datatype = 0;
     44    psS32 hduType = IMAGE_HDU;
     45    psS32 fitsDatatype = 0;
     46    psS32 datatype = 0;
    4847
    4948    if (filename == NULL) {
     
    228227}
    229228
    230 bool psImageWriteSection(psImage* input,
    231                          int col0,
    232                          int row0,
    233                          int z,
    234                          char *extname,
    235                          int extnum,
    236                          char *filename)
     229psBool psImageWriteSection(psImage* input,
     230                           psS32 col0,
     231                           psS32 row0,
     232                           psS32 z,
     233                           char *extname,
     234                           psS32 extnum,
     235                           char *filename)
    237236{
    238     int numCols = 0;
    239     int numRows = 0;
    240 
    241     int status = 0;             /* CFITSIO status */
     237    psS32 numCols = 0;
     238    psS32 numRows = 0;
     239
     240    psS32 status = 0;             /* CFITSIO status */
    242241    fitsfile *fptr = NULL;      /* pointer to the FITS file */
    243     long nAxes[3];              /* Image axis vars */
    244     long firstPixel[3];         /* First Pixel to read */
    245     long lastPixel[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 */
    246245    char fitsErr[80];           /* FITSIO message string */
    247     int datatype = 0;           /* the datatype of the image */
    248     int bitPix = 0;             /* FITS bitPix value */
    249     int hduType = 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.) */
    250249    double bscale = 1.0;
    251250    double bzero = 0.0;
    252     bool createNewHDU = false;
     251    psBool createNewHDU = false;
    253252
    254253    /* need a valid image to write */
     
    336335            }
    337336        } else {
    338             int numHDUs = 0;
     337            psS32 numHDUs = 0;
    339338
    340339            fits_get_num_hdus(fptr, &numHDUs, &status);
Note: See TracChangeset for help on using the changeset viewer.