IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 268


Ignore:
Timestamp:
Mar 19, 2004, 4:41:22 PM (22 years ago)
Author:
eugene
Message:

minor cleanups

File:
1 edited

Legend:

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

    r257 r268  
    1414    union {
    1515        psF32 **rows;                   ///< == rows_f32
    16         psS8  **rows_s8;                        ///< pointers to psS8 data
    17         psS16 **rows_s16;                       ///< pointers to psS16 data
    18         psS32 **rows_s32;                       ///< pointers to psS32 data
    19         psU8  **rows_u8;                        ///< pointers to psU8 data
    20         psU16 **rows_u16;                       ///< pointers to psU16 data
    21         psU32 **rows_u32;                       ///< pointers to psU32 data
    22         psF32 **rows_f32;                       ///< pointers to psF32 data
    23         psF64 **rows_f64;                       ///< pointers to psF64 data
     16        psS8  **rows_s8;                ///< pointers to psS8 data
     17        psS16 **rows_s16;               ///< pointers to psS16 data
     18        psS32 **rows_s32;               ///< pointers to psS32 data
     19        psU8  **rows_u8;                ///< pointers to psU8 data
     20        psU16 **rows_u16;               ///< pointers to psU16 data
     21        psU32 **rows_u32;               ///< pointers to psU32 data
     22        psF32 **rows_f32;               ///< pointers to psF32 data
     23        psF64 **rows_f64;               ///< pointers to psF64 data
    2424    } rows;
    2525    struct psImage *parent;             ///< parent, if a subimage
     
    4848               int ny,                  ///< subimage width (<= image.ny - y0) 
    4949               int x0,                  ///< subimage x-offset (0 <= x0 < nx)   
    50                int y0                   ///< subimage y-offset (0 <= y0 < ny)   
    51     );
     50               int y0)                  ///< subimage y-offset (0 <= y0 < ny)   
     51;
    5252
    5353/// Destroy the specified image (destroy children if they exist).
    5454void
    55 psImageFree (psImage *image             ///< free this image
    56 );
     55psImageFree (psImage *image)            ///< free this image
     56;
    5757
    5858/// Destroy the children of the specified image.
    5959int
    60 psImageFreeChildren (psImage *image     ///< free children of this image
    61 );
     60psImageFreeChildren (psImage *image)    ///< free children of this image
     61;
    6262
    6363/// Create a copy of the specified image.
    6464psImage *
    6565psImageCopy (psImage *output,           ///< target structure for output image data
    66              psImage *input             ///< copy this image
    67 );
     66             psImage *input)            ///< copy this image
     67;
    6868
    6969/*** various image pixel extractions ***/
     
    7777              int ny,                   ///< width of region in y
    7878              int direction,            ///< direction of vector along slice
    79               psStats *stats            ///< defines statistics used to find output values
    80 );
     79              psStats *stats)           ///< defines statistics used to find output values
     80;
    8181
    8282/// Extract pixels along a line to a vector.
     
    8888            float ye,                   ///< ending y coord of cut
    8989            float dw,                   ///< width of cut
    90             psStats *stats              ///< defines statistics used to find output values
    91     );
     90            psStats *stats)             ///< defines statistics used to find output values
     91;
    9292
    9393/// Extract radial annulii data to a vector.
     
    9898                  float radius,         ///< outer radius of annulii
    9999                  float dr,             ///< radial step size of annulii
    100                   psStats *stats                ///< defines statistics used to find output values
    101     );
     100                  psStats *stats)               ///< defines statistics used to find output values
     101;
    102102
    103103/// Extract a 2-d contour from an image at the given threshold.
     
    105105psImageContour (psImage *input,         ///< create contour for this image
    106106                float threshold,        ///< contour image at this threshold
    107                 int binning             ///< bin image by this value for contour calculation
    108 );
     107                int binning)            ///< bin image by this value for contour calculation
     108;
    109109
    110110/*** various image geometry manipulation ***/
     
    113113psImageRebin (psImage *input,           ///< rebin this image
    114114              float scale,              ///< rebinning scale: doutput = scale*dinput
    115               psStats *stats            ///< defines statistics used to find output values
    116 );
     115              psStats *stats)           ///< defines statistics used to find output values
     116;
    117117
    118118/// Rotate image by given angle.
    119119psImage *
    120120psImageRotate (psImage *input,          ///< rotate this image
    121                float angle              ///< rotate by this amount (degrees)
    122 );
     121               float angle)             ///< rotate by this amount (degrees)
     122;
    123123
    124124/// 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.
     
    136136psImageRoll (psImage *input,            ///< roll this image
    137137             int dx,                    ///< roll this amount in x
    138              int dy                     ///< roll this amount in y
    139 );
     138             int dy)                    ///< roll this amount in y
     139;
    140140
    141141/// Determine statistics for image (or subimage).
    142142psStats *
    143143psImageGetStats (psImage *input,        ///< image (or subimage) to calculate stats
    144                  psStats *stats);       ///< defines statistics to be calculated
     144                 psStats *stats)        ///< defines statistics to be calculated
     145;
    145146
    146147/// Construct a histogram from an image (or subimage).
    147148psHistogram *
    148149psImageHistogram (psHistogram *hist,    ///< input histogram description & target
    149                   psImage *input        ///< determine histogram of this image
    150     );
     150                  psImage *input)       ///< determine histogram of this image
     151;
    151152
    152153/// Fit a 2-D polynomial surface to an image.
    153154psPolynomial2D *
    154155psImageFitPolynomial (psImage *input,   ///< image to fit
    155                       psPolynomial2D *coeffs ///< coefficient structure carries in desired terms
    156 );
     156                      psPolynomial2D *coeffs) ///< coefficient structure carries in desired terms
     157;
    157158
    158159/// Evaluate a 2-D polynomial surface to image pixels.
    159160int
    160161psImageEvalPolynomial (psImage *input,  ///< image to fit
    161                        psPolynomial2D *coeffs ///< coefficient structure carries in desired terms
    162 );
     162                       psPolynomial2D *coeffs) ///< coefficient structure carries in desired terms
     163;
    163164
    164165/*** image input/output routines ***/
     
    168169                    int x,              ///< starting x coord of region
    169170                    int y,              ///< starting y coord of region
    170                     int dx,             ///< x size of region (-1 for full range)
    171                     int dy,             ///< y size of region (-1 for full range)
     171                    int nx,             ///< x size of region (-1 for full range)
     172                    int ny,             ///< y size of region (-1 for full range)
    172173                    int z,              ///< plane of interest
    173174                    char *extname,      ///< MEF extension name ("PHU" for primary header)
    174                     char *filename      ///< file to read data from
    175 );
     175                    int extnum,         ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
     176                    char *filename)     ///< file to read data from
     177;
    176178
    177179/// Read an image or subimage from file descriptor.
     
    184186                     int z,             ///< plane of interest                     
    185187                     char *extname,     ///< MEF extension name ("PHU" for primary header)                         
    186                      FILE *f            ///< file descriptor to read data from             
    187 );
     188                     int extnum,        ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
     189                     FILE *f)           ///< file descriptor to read data from             
     190;
    188191
    189192/// Write an image section to named file (which may exist).
     
    194197                     int z,             ///< plane of interest                     
    195198                     char *extname,     ///< MEF extension name ("PHU" for primary header)                         
    196                      char *filename     ///< file to write data to                 
    197 );
     199                     int extnum,        ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
     200                     char *filename)    ///< file to write data to                 
     201;
    198202
    199203/// Write an image section to named file (which may exist).
     
    204208                     int z,             ///< plane of interest                     
    205209                     char *extname,     ///< MEF extension name                   
    206                      FILE *f            ///< file descriptor to write data to             
    207 );
     210                     int extnum,        ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
     211                     FILE *f)           ///< file descriptor to write data to             
     212;
    208213
    209214/// Read only header from image file.
     
    211216psImageReadHeader(struct psMetadata *output,    ///< read data to this structure
    212217                  char *extname,        ///< MEF extension name ("PHU" for primary header)
    213                   char *filename        ///< file to read from
    214 );
     218                  int extnum,           ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
     219                  char *filename)       ///< file to read from
     220;
    215221
    216222/// Read only header from image file descriptor.
    217223struct psMetadata *
    218224psImageFReadHeader (struct psMetadata *output, ///< read data to this structure
    219                    char *extname,       ///< MEF extension name ("PHU" for primary header)
    220                    FILE *f              ///< file descriptor to read from
    221 );
     225                    char *extname,      ///< MEF extension name ("PHU" for primary header)
     226                    int extnum,         ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
     227                    FILE *f)            ///< file descriptor to read from
     228;
    222229
    223230/*** image FFT operations ***/
     
    225232psImage *
    226233psImageFFT (psImage *input,             ///< image to FFT
    227             int direction               ///< FFT direction
    228 );
     234            int direction)              ///< FFT direction
     235;
    229236
    230237/*** basic pixel manipulations ***/
     
    235242             float vmin,                ///< set min-clipped pixels to vmin
    236243             float max,                 ///< clip pixels with values > max
    237              float vmax                 ///< set max-clipped pixels to vmax
    238 );
     244             float vmax)                ///< set max-clipped pixels to vmax
     245;
    239246
    240247/// Clip NaN image pixels to given value.
    241248int
    242249psImageClipNaN (psImage *input,         ///< clip this image
    243                 float value             ///< set nan pixels to this value
    244 );
     250                float value)            ///< set nan pixels to this value
     251;
    245252
    246253/*** image arithmetic ***/
     
    250257                 psImage *in1,          ///< first input image
    251258                 char *operator,        ///< operator
    252                  psImage *in2           ///< second input image
    253 );
     259                 psImage *in2)          ///< second input image
     260;
    254261
    255262/// Perform a unary operation on an image.
     
    257264psImageUnaryOp (psImage *out,           ///< destination image (may be NULL)
    258265                psImage *in1,           ///< input image
    259                 char *operator          ///< operator
    260 );
     266                char *operator)         ///< operator
     267;
    261268
    262269/// Overlay subregion of image with another image.
    263270int
    264 psImageOverlaySection (psImage *image,          ///< input image
     271psImageOverlaySection (psImage *image,  ///< input image
    265272                psImage *overlay,       ///< image to overlay
    266273                int x0,                 ///< x offset of overlay subimage
    267274                int y0,                 ///< y offset of overlay subimage
    268                 char *operator          ///< overlay operation
    269 );
     275                char *operator)         ///< overlay operation
     276;
    270277
    271278/* \} */ // End of AstroGroup Functions
Note: See TracChangeset for help on using the changeset viewer.