IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 13, 2004, 1:16:19 PM (22 years ago)
Author:
eugene
Message:

psFloatArray, psDoubleArray, psIntArray, etc merged into
psVector. psVector is analogous to psImage. reference to the old
forms have been converted to psVector. the file psStdArrays.h has
been removed and replaced with psVector.h (containing the vector
functions) and psTypes.h (containing the basic data types)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/archive/pslib/include/psImage.h

    r617 r671  
    2626    const struct psImage *parent;       ///< parent, if a subimage
    2727    int Nchildren;                      ///< number of subimages
    28     struct psImage *children;           ///< children of this region; array of Nchildren pointers
     28    struct psImage **children;          ///< children of this region; array of Nchildren pointers
    2929} psImage;
    3030
     
    4040psImageAlloc (int nx,                   ///< image width
    4141              int ny,                   ///< image height
    42               psElemType type           ///< image data type
    43     );
     42              psElemType type)          ///< image data type
     43;
    4444
    4545/// Create a subimage of the specified area.
     
    4949              int ny,                   ///< subimage width (<= image.ny - y0) 
    5050              int x0,                   ///< subimage x-offset (0 <= x0 < nx)   
    51               int y0                    ///< subimage y-offset (0 <= y0 < ny)   
    52     );
     51              int y0)                   ///< subimage y-offset (0 <= y0 < ny)   
     52;
    5353
    5454/// Destroy the specified image (destroy children if they exist).
    5555void
    56 psImageFree(psImage *restrict image     ///< free this image
    57     );
     56psImageFree(psImage *restrict image)    ///< free this image
     57;
    5858
    5959/** Destroy the pixels of the specified image */
    6060psImage *
    61 psImageFreePixels(psImage *restrict image ///< Image whose pixels are to be freed
    62     );
     61psImageFreePixels(psImage *restrict image) ///< Image whose pixels are to be freed
     62;
    6363
    6464/// Create a copy of the specified image.
     
    6666psImageCopy(psImage *output,            ///< target structure for output image data
    6767            const psImage *input,       ///< copy this image
    68             psElemType type             ///< element type of output image
    69     );
     68            psElemType type)            ///< element type of output image
     69;
    7070
    7171/*** various image pixel extractions ***/
    7272
    7373/// Extract pixels from rectlinear region to a vector.
    74 psFloatArray *
    75 psImageSlice(psFloatArray *out,         ///< Vector to output, or NULL
     74psVector *
     75psImageSlice(psVector *out,             ///< Vector to output, or NULL
    7676             const psImage *input,      ///< extract slice from this image
    7777             int x,                     ///< starting x coord of region to slice
     
    8080             int ny,                    ///< width of region in y
    8181             int direction,             ///< direction of vector along slice
    82              const psStats *stats       ///< defines statistics used to find output values
    83     );
     82             const psStats *stats)      ///< defines statistics used to find output values
     83;
    8484
    8585/// Extract pixels along a line to a vector.
    86 psFloatArray *
    87 psImageCut(psFloatArray *out,           ///< Vector to output, or NULL
     86psVector *
     87psImageCut(psVector *out,               ///< Vector to output, or NULL
    8888           const psImage *input,        ///< extract cut from this image
    8989           float xs,                    ///< starting x coord of cut
     
    9292           float ye,                    ///< ending y coord of cut
    9393           float dw,                    ///< width of cut
    94            const psStats *stats         ///< defines statistics used to find output values
    95     );
     94           const psStats *stats)                ///< defines statistics used to find output values
     95;
    9696
    9797/// Extract radial annulii data to a vector.
    98 psFloatArray *
    99 psImageRadialCut(psFloatArray *out,     ///< Vector to output, or NULL
     98psVector *
     99psImageRadialCut(psVector *out,         ///< Vector to output, or NULL
    100100                 const psImage *input,  ///< extract profile from this image
    101101                 float x,               ///< center x coord of annulii
    102102                 float y,               ///< center y coord of annulii
    103                  const psFloatArray *radii, ///< Radii of the annuli
    104                  const psStats *stats   ///< defines statistics used to find output values
    105     );
     103                 const psVector *radii, ///< Radii of the annuli
     104                 const psStats *stats)  ///< defines statistics used to find output values
     105;
    106106
    107107/*** various image geometry manipulation ***/
     
    111111             const psImage *input,      ///< rebin this image
    112112             float scale,               ///< rebinning scale: doutput = scale*dinput
    113              const psStats *stats       ///< defines statistics used to find output values
    114     );
     113             const psStats *stats)      ///< defines statistics used to find output values
     114;
    115115
    116116/// Rotate image by given angle.
     
    118118psImageRotate(psImage *out,             ///< Image to output, or NULL
    119119              const psImage *input,     ///< rotate this image
    120               float angle               ///< rotate by this amount anti-clockwise (degrees)
    121     );
     120              float angle)              ///< rotate by this amount anti-clockwise (degrees)
     121;
    122122
    123123/// Shift image by an arbitrary number of pixels in either direction.
     
    128128             float dx,                  ///< shift by this amount in x
    129129             float dy,                  ///< shift by this amount in y
    130              float exposed              ///< set exposed pixels to this value
    131     );
     130             float exposed)             ///< set exposed pixels to this value
     131;
    132132
    133133/// Roll image by an integer number of pixels in either direction.
     
    137137            const psImage *input,       ///< roll this image
    138138            int dx,                     ///< roll this amount in x
    139             int dy                      ///< roll this amount in y
    140     );
     139            int dy)                     ///< roll this amount in y
     140;
    141141
    142142/// Determine statistics for image (or subimage).
    143143psStats *
    144144psImageGetStats(psStats *stats,         ///< defines statistics to be calculated & target
    145                 const psImage *input    ///< image (or subimage) to calculate stats
    146                 );
     145                const psImage *input)   ///< image (or subimage) to calculate stats
     146;
    147147
    148148/// Construct a histogram from an image (or subimage).
    149149psHistogram *
    150150psImageHistogram(psHistogram *hist,     ///< input histogram description & target
    151                  const psImage *input   ///< determine histogram of this image
    152     );
     151                 const psImage *input)  ///< determine histogram of this image
     152;
    153153
    154154/// Fit a 2-D polynomial surface to an image.
    155155psPolynomial2D *
    156156psImageFitPolynomial(psPolynomial2D *coeffs, ///< coefficient structure carries in desired terms & target
    157                      const psImage *input ///< image to fit
    158     );
     157                     const psImage *input) ///< image to fit
     158;
    159159
    160160/// Evaluate a 2-D polynomial surface to image pixels.
    161161psImage *
    162162psImageEvalPolynomial(const psImage *input, ///< image to produce
    163                       const psPolynomial2D *coeffs ///< coefficient structure carries in desired terms
    164     );
     163                      const psPolynomial2D *coeffs) ///< coefficient structure carries in desired terms
     164;
    165165
    166166/*** image input/output routines ***/
     
    175175                   const char *extname, ///< MEF extension name ("PHU" for primary header)
    176176                   int extnum,          ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
    177                    const char *filename ///< file to read data from
    178     );
     177                   const char *filename)        ///< file to read data from
     178;
    179179
    180180/// Read an image or subimage from file descriptor.
     
    188188                    const char *extname, ///< MEF extension name ("PHU" for primary header)
    189189                    int extnum,         ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
    190                     FILE *f             ///< file descriptor to read data from             
    191     );
     190                    FILE *f)            ///< file descriptor to read data from             
     191;
    192192
    193193/// Write an image section to named file (which may exist).
     
    199199                    const char *extname, ///< MEF extension name ("PHU" for primary header)
    200200                    int extnum,         ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
    201                     const char *filename ///< file to write data to               
    202     );
     201                    const char *filename) ///< file to write data to               
     202;
    203203
    204204/// Write an image section to named file (which may exist).
     
    210210                     const char *extname, ///< MEF extension name                         
    211211                     int extnum,        ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
    212                      FILE *f            ///< file descriptor to write data to             
    213     );
     212                     FILE *f)           ///< file descriptor to write data to             
     213;
    214214
    215215/// Read only header from image file.
     
    218218                  const char *extname,  ///< MEF extension name ("PHU" for primary header)
    219219                  int extnum,           ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
    220                   const char *filename  ///< file to read from
    221     );
     220                  const char *filename) ///< file to read from
     221;
    222222
    223223/// Read only header from image file descriptor.
     
    226226                   const char *extname, ///< MEF extension name ("PHU" for primary header)
    227227                   int extnum,          ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
    228                    FILE *f              ///< file descriptor to read from
    229     );
     228                   FILE *f)             ///< file descriptor to read from
     229;
    230230
    231231/*** basic pixel manipulations ***/
     
    236236            float vmin,                 ///< set min-clipped pixels to vmin
    237237            float max,                  ///< clip pixels with values > max
    238             float vmax                  ///< set max-clipped pixels to vmax
    239     );
     238            float vmax)                 ///< set max-clipped pixels to vmax
     239;
    240240
    241241/// Clip NaN image pixels to given value.  Return number of clipped pixels.
    242242int
    243243psImageClipNaN(psImage *input,          ///< clip this image & target
    244                float value              ///< set nan pixels to this value
    245     );
     244               float value)             ///< set nan pixels to this value
     245;
    246246
    247247/// Overlay subregion of image with another image.  Return number of pixels replaced.
     
    251251                      int x0,           ///< x offset of overlay subimage
    252252                      int y0,           ///< y offset of overlay subimage
    253                       const char *op    ///< overlay operation
    254     );
     253                      const char *op)   ///< overlay operation
     254;
    255255
    256256/* \} */ // End of AstroGroup Functions
Note: See TracChangeset for help on using the changeset viewer.