IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1440 for trunk/psLib/src/image


Ignore:
Timestamp:
Aug 9, 2004, 1:34:58 PM (22 years ago)
Author:
desonia
Message:

cleanup of some indent-induced madness.

Location:
trunk/psLib/src/image
Files:
10 edited

Legend:

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

    r1407 r1440  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.38 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2004-08-07 00:06:06 $
     12 *  @version $Revision: 1.39 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2004-08-09 23:34:58 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3232#include "psImage.h"
    3333
    34 static void imageFree(psImage * image);
     34static void imageFree(psImage* image);
    3535
    3636/*****************************************************************************/
     
    4040/*****************************************************************************/
    4141
    42 psImage *psImageAlloc(unsigned int numCols, unsigned int numRows, const psElemType type)
     42psImage* psImageAlloc(unsigned int numCols, unsigned int numRows, const psElemType type)
    4343{
    4444    int area = 0;
     
    6161    }
    6262
    63     psImage *image = (psImage *) psAlloc(sizeof(psImage));
     63    psImage* image = (psImage* ) psAlloc(sizeof(psImage));
    6464
    6565    if (image == NULL) {
     
    8787    *(unsigned int *)&image->numCols = numCols;
    8888    *(unsigned int *)&image->numRows = numRows;
    89     *(psDimen *) & image->type.dimen = PS_DIMEN_IMAGE;
    90     *(psElemType *) & image->type.type = type;
     89    *(psDimen* ) & image->type.dimen = PS_DIMEN_IMAGE;
     90    *(psElemType* ) & image->type.type = type;
    9191    image->parent = NULL;
    9292    image->nChildren = 0;
     
    9696}
    9797
    98 static void imageFree(psImage * image)
     98static void imageFree(psImage* image)
    9999{
    100100    if (image == NULL) {
     
    107107        unsigned int oldNumRows = image->numRows;
    108108        unsigned int oldNumCols = image->numCols;
    109         psPTR *rowPtr;
     109        psPTR* rowPtr;
    110110
    111111        for (unsigned int row = 0; row < oldNumRows; row++) {
     
    124124}
    125125
    126 psImage *psImageRecycle(psImage * old, unsigned int numCols, unsigned int numRows, const psElemType type)
     126psImage* psImageRecycle(psImage* old, unsigned int numCols, unsigned int numRows, const psElemType type)
    127127{
    128128    int elementSize = PSELEMTYPE_SIZEOF(type);  // element
     
    151151        unsigned int oldNumRows = old->numRows;
    152152        unsigned int oldNumCols = old->numCols;
    153         psPTR *rowPtr;
     153        psPTR* rowPtr;
    154154
    155155        for (unsigned int row = 0; row < oldNumRows; row++) {
     
    177177    *(unsigned int *)&old->numCols = numCols;
    178178    *(unsigned int *)&old->numRows = numRows;
    179     *(psElemType *) & old->type.type = type;
     179    *(psElemType* ) & old->type.type = type;
    180180
    181181    return old;
    182182}
    183183
    184 int psImageFreeChildren(psImage * image)
     184int psImageFreeChildren(psImage* image)
    185185{
    186186    int i = 0;
    187187    int nChildren = 0;
    188     psImage **children = NULL;
     188    psImage* *children = NULL;
    189189    int numFreed = 0;
    190190
     
    216216linear interpolation is performed on the image.
    217217 *****************************************************************************/
    218 psF32 psImagePixelInterpolate(const psImage * input,
     218psF32 psImagePixelInterpolate(const psImage* input,
    219219                              float x, float y, psF32 unexposedValue, psImageInterpolateMode mode)
    220220{
     
    259259
    260260#define PSIMAGE_PIXEL_INTERPOLATE_FLAT(TYPE) \
    261 inline psF64 p_psImagePixelInterpolateFLAT_##TYPE(const psImage *input, \
     261inline psF64 p_psImagePixelInterpolateFLAT_##TYPE(const psImage* input, \
    262262        float x, \
    263263        float y, \
     
    280280
    281281#define PSIMAGE_PIXEL_INTERPOLATE_FLAT_COMPLEX(TYPE) \
    282 inline psC64 p_psImagePixelInterpolateFLAT_##TYPE(const psImage *input, \
     282inline psC64 p_psImagePixelInterpolateFLAT_##TYPE(const psImage* input, \
    283283        float x, \
    284284        float y, \
     
    313313PSIMAGE_PIXEL_INTERPOLATE_FLAT_COMPLEX(C64)
    314314#define PSIMAGE_PIXEL_INTERPOLATE_BILINEAR(TYPE) \
    315 inline psF64 p_psImagePixelInterpolateBILINEAR_##TYPE(const psImage *input, \
     315inline psF64 p_psImagePixelInterpolateBILINEAR_##TYPE(const psImage* input, \
    316316        float x, \
    317317        float y, \
     
    368368}
    369369#define PSIMAGE_PIXEL_INTERPOLATE_BILINEAR_COMPLEX(TYPE) \
    370 inline psC64 p_psImagePixelInterpolateBILINEAR_##TYPE(const psImage *input, \
     370inline psC64 p_psImagePixelInterpolateBILINEAR_##TYPE(const psImage* input, \
    371371        float x, \
    372372        float y, \
  • trunk/psLib/src/image/psImage.h

    r1426 r1440  
    1212 *  @author Ross Harman, MHPCC
    1313 *
    14  *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2004-08-09 22:44:25 $
     14 *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2004-08-09 23:34:58 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5050
    5151    union {
    52         psU8 **U8;              ///< Unsigned 8-bit integer data.
    53         psU16 **U16;            ///< Unsigned 16-bit integer data.
    54         psU32 **U32;            ///< Unsigned 32-bit integer data.
    55         psU64 **U64;            ///< Unsigned 64-bit integer data.
    56         psS8 **S8;              ///< Signed 8-bit integer data.
    57         psS16 **S16;            ///< Signed 16-bit integer data.
    58         psS32 **S32;            ///< Signed 32-bit integer data.
    59         psS64 **S64;            ///< Signed 64-bit integer data.
    60         psF32 **F32;            ///< Single-precision float data.
    61         psF64 **F64;            ///< Double-precision float data.
    62         psC32 **C32;            ///< Single-precision complex data.
    63         psC64 **C64;            ///< Double-precision complex data.
    64         psPTR **PTR;            ///< Void pointers.
    65         psPTR *V;               ///< Pointer to data.
     52        psU8* *U8;              ///< Unsigned 8-bit integer data.
     53        psU16* *U16;            ///< Unsigned 16-bit integer data.
     54        psU32* *U32;            ///< Unsigned 32-bit integer data.
     55        psU64* *U64;            ///< Unsigned 64-bit integer data.
     56        psS8* *S8;              ///< Signed 8-bit integer data.
     57        psS16* *S16;            ///< Signed 16-bit integer data.
     58        psS32* *S32;            ///< Signed 32-bit integer data.
     59        psS64* *S64;            ///< Signed 64-bit integer data.
     60        psF32* *F32;            ///< Single-precision float data.
     61        psF64* *F64;            ///< Double-precision float data.
     62        psC32* *C32;            ///< Single-precision complex data.
     63        psC64* *C64;            ///< Double-precision complex data.
     64        psPTR* *PTR;            ///< Void pointers.
     65        psPTR* V;               ///< Pointer to data.
    6666    } data;                     ///< Union for data types.
    67     const struct psImage *parent;       ///< Parent, if a subimage.
     67    const struct psImage* parent;       ///< Parent, if a subimage.
    6868    int nChildren;              ///< Number of subimages.
    69     struct psImage **children;  ///< Children of this region.
     69    struct psImage* *children;  ///< Children of this region.
    7070}
    7171psImage;
     
    8282 * specified size and type.
    8383 *
    84  * @return psImage*: Pointer to psImage.
     84 * @return psImage* : Pointer to psImage.
    8585 *
    8686 */
    87 psImage *psImageAlloc(unsigned int numCols,     ///< Number of rows in image.
     87psImage* psImageAlloc(unsigned int numCols,     ///< Number of rows in image.
    8888                      unsigned int numRows,     ///< Number of columns in image.
    8989                      const psElemType type     ///< Type of data for image.
     
    9595 *
    9696 */
    97 psImage *psImageRecycle(psImage * old,  ///< the psImage to recycle by resizing image buffer
     97psImage* psImageRecycle(psImage* old,  ///< the psImage to recycle by resizing image buffer
    9898                        unsigned int numCols,   ///< the desired number of columns in image
    9999                        unsigned int numRows,   ///< the desired number of rows in image
     
    106106 *
    107107 */
    108 int psImageFreeChildren(psImage * image
     108int psImageFreeChildren(psImage* image
    109109
    110110                        /**< psImage in which all children shall be deallocated */
    111111                       );
    112112
    113 psF32 psImagePixelInterpolate(const psImage * input,
     113psF32 psImagePixelInterpolate(const psImage* input,
    114114                              float x, float y, psF32 unexposedValue, psImageInterpolateMode mode);
    115115
    116116#    define p_psImagePixelInterpolateFcns(TYPE) \
    117117inline psF64 p_psImagePixelInterpolateFLAT_##TYPE( \
    118         const psImage *input, \
     118        const psImage* input, \
    119119        float x, \
    120120        float y, \
     
    122122                                                 ); \
    123123inline psF64 p_psImagePixelInterpolateBILINEAR_##TYPE( \
    124         const psImage *input, \
     124        const psImage* input, \
    125125        float x, \
    126126        float y, \
     
    130130#    define p_psImagePixelInterpolateComplexFcns(TYPE) \
    131131inline psC64 p_psImagePixelInterpolateFLAT_##TYPE( \
    132         const psImage *input, \
     132        const psImage* input, \
    133133        float x, \
    134134        float y, \
     
    136136                                                 ); \
    137137inline psC64 p_psImagePixelInterpolateBILINEAR_##TYPE( \
    138         const psImage *input, \
     138        const psImage* input, \
    139139        float x, \
    140140        float y, \
  • trunk/psLib/src/image/psImageExtraction.c

    r1407 r1440  
    1010*  @author Robert DeSonia, MHPCC
    1111*
    12 *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2004-08-07 00:06:06 $
     12*  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2004-08-09 23:34:58 $
    1414*
    1515*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2323#include "psError.h"
    2424
    25 psImage *psImageSubset(psImage * out,
    26                        psImage * image,
     25psImage* psImageSubset(psImage* out,
     26                       psImage* image,
    2727                       unsigned int numCols, unsigned int numRows, unsigned int col0, unsigned int row0)
    2828{
     
    8383    *(int *)&out->row0 = row0;
    8484    *(int *)&out->col0 = col0;
    85     *(psImage **) & out->parent = (psImage *) image;
     85    *(psImage* *) & out->parent = (psImage* ) image;
    8686
    8787    // add output image as a child of the input
    8888    // image.
    8989    image->nChildren++;
    90     image->children = (psImage **) psRealloc(image->children, image->nChildren * sizeof(psImage *));
     90    image->children = (psImage* *) psRealloc(image->children, image->nChildren * sizeof(psImage* ));
    9191    image->children[image->nChildren - 1] = out;
    9292
     
    101101}
    102102
    103 psImage *psImageCopy(psImage * restrict output, const psImage * input, psElemType type)
     103psImage* psImageCopy(psImage* restrict output, const psImage* input, psElemType type)
    104104{
    105105    psElemType inDatatype;
     
    242242}
    243243
    244 psVector *psImageSlice(psVector * out,
    245                        psVector * slicePositions,
    246                        const psImage * restrict in,
    247                        const psImage * restrict mask,
     244psVector* psImageSlice(psVector* out,
     245                       psVector* slicePositions,
     246                       const psImage* restrict in,
     247                       const psImage* restrict mask,
    248248                       unsigned int maskVal,
    249249                       unsigned int col,
    250250                       unsigned int row,
    251251                       unsigned int numCols,
    252                        unsigned int numRows, psImageCutDirection direction, const psStats * stats)
     252                       unsigned int numRows, psImageCutDirection direction, const psStats* stats)
    253253{
    254254    double statVal;
    255     psStats *myStats;
     255    psStats* myStats;
    256256    psElemType type;
    257257    int inRows;
    258258    int inCols;
    259259    int delta = 1;
    260     psF64 *outData;
     260    psF64* outData;
    261261
    262262    if (in == NULL || in->data.V == NULL) {
     
    328328
    329329    if (direction == PS_CUT_X_POS || direction == PS_CUT_X_NEG) {
    330         psVector *imgVec = psVectorAlloc(numRows, type);
    331         psVector *maskVec = NULL;
    332         psMaskType *maskData = NULL;
    333         psU32 *outPosition = NULL;
     330        psVector* imgVec = psVectorAlloc(numRows, type);
     331        psVector* maskVec = NULL;
     332        psMaskType* maskData = NULL;
     333        psU32* outPosition = NULL;
    334334
    335335        // recycle output to make a proper
     
    362362                if (maskVec != NULL) { \
    363363                    maskVecData = maskVec->data.V; \
    364                     maskData = (psMaskType*)(mask->data.V[row]) + col + c; \
     364                    maskData = (psMaskType* )(mask->data.V[row]) + col + c; \
    365365                } \
    366366                for (int r=0;r<numRows;r++) { \
     
    417417        // Y
    418418        // direction
    419         psVector *imgVec = NULL;
    420         psVector *maskVec = NULL;
     419        psVector* imgVec = NULL;
     420        psVector* maskVec = NULL;
    421421        int elementSize = PSELEMTYPE_SIZEOF(type);
    422         psU32 *outPosition = NULL;
     422        psU32* outPosition = NULL;
    423423
    424424        // fill in psVectors to fake out the
  • trunk/psLib/src/image/psImageExtraction.h

    r1426 r1440  
    1010*  @author Robert DeSonia, MHPCC
    1111*
    12 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2004-08-09 22:44:25 $
     12*  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2004-08-09 23:34:58 $
    1414*
    1515*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4040 * one.
    4141 *
    42  * @return psImage*: Pointer to psImage.
     42 * @return psImage* : Pointer to psImage.
    4343 *
    4444 */
     
    5454/** Makes a copy of a psImage
    5555 *
    56  * @return psImage*  Copy of the input psImage.  This may not be equal to the
     56 * @return psImage* Copy of the input psImage.  This may not be equal to the
    5757 * output parameter
    5858 *
     
    7878 * @return psVector    the resulting vector
    7979 */
    80 psVector *psImageSlice(
     80psVector* psImageSlice(
    8181    psVector* out,                     ///< psVector to recycle, or NULL.
    8282    psVector* slicePositions,
     
    111111 *  @return psVector    resulting vector
    112112 */
    113 psVector *psImageCut(
     113psVector* psImageCut(
    114114    psVector* out,                     ///< psVector to recycle, or NULL.
    115115    const psImage* input,              ///< the input image in which to perform the cut
  • trunk/psLib/src/image/psImageIO.c

    r1407 r1440  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2004-08-07 00:06:06 $
     10 *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2004-08-09 23:34:58 $
    1212 *
    1313 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2222#include "psMemory.h"
    2323
    24 psImage *psImageReadSection(psImage * output,
     24psImage* psImageReadSection(psImage* output,
    2525                            int col,
    2626                            int row,
     
    199199}
    200200
    201 bool psImageWriteSection(psImage * input, int col0, int row0, int z, char *extname, int extnum,
     201bool psImageWriteSection(psImage* input, int col0, int row0, int z, char *extname, int extnum,
    202202                         char *filename)
    203203{
  • trunk/psLib/src/image/psImageIO.h

    r1407 r1440  
    1010 *  @author Robert DeSonia, MHPCC
    1111 *
    12  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2004-08-07 00:06:06 $
     12 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2004-08-09 23:34:58 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2727/** Read an image or subimage from a FITS file specified by a filename.
    2828 *
    29  *  return psImage*         The image read from the specified file.  NULL
     29 *  return psImage* The image read from the specified file.  NULL
    3030 *                          signifies that a problem had occured.
    3131 */
    32 psImage *psImageReadSection(psImage * output,
     32psImage* psImageReadSection(psImage* output,
    3333
    3434                            /**< the output psImage to recycle, or NULL if new psImage desired */
     
    6767 *  return bool         TRUE is successful, otherwise FALSE.
    6868 */
    69 bool psImageWriteSection(psImage * input,
     69bool psImageWriteSection(psImage* input,
    7070
    7171                         /**< the psImage to write */
  • trunk/psLib/src/image/psImageManip.c

    r1407 r1440  
    1111 *  @author Ross Harman, MHPCC
    1212 *
    13  *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2004-08-07 00:06:06 $
     13 *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2004-08-09 23:34:58 $
    1515 *
    1616 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3131#include "psImageExtraction.h"
    3232
    33 int psImageClip(psImage * input, psF64 min, psF64 vmin, psF64 max, psF64 vmax)
     33int psImageClip(psImage* input, psF64 min, psF64 vmin, psF64 max, psF64 vmax)
    3434{
    3535    int numClipped = 0;
     
    125125}
    126126
    127 int psImageClipNaN(psImage * input, psF64 value)
     127int psImageClipNaN(psImage* input, psF64 value)
    128128{
    129129    int numClipped = 0;
     
    164164}
    165165
    166 int psImageOverlaySection(psImage * image, const psImage * overlay, int col0, int row0, const char *op)
     166int psImageOverlaySection(psImage* image, const psImage* overlay, int col0, int row0, const char *op)
    167167{
    168168    unsigned int imageNumRows;
     
    267267}
    268268
    269 int psImageClipComplexRegion(psImage * input, psC64 min, psC64 vmin, psC64 max, psC64 vmax)
     269int psImageClipComplexRegion(psImage* input, psC64 min, psC64 vmin, psC64 max, psC64 vmax)
    270270{
    271271    int numClipped = 0;
     
    340340}
    341341
    342 psImage *psImageRebin(psImage * out, const psImage * in, unsigned int scale, const psStats * stats)
     342psImage* psImageRebin(psImage* out, const psImage* in, unsigned int scale, const psStats* stats)
    343343{
    344344    int inRows;
     
    346346    int outRows;
    347347    int outCols;
    348     psVector *vec;              // vector to hold
     348    psVector* vec;              // vector to hold
    349349
    350350    // the values of
    351351    // a single bin.
    352     psStats *myStats;
     352    psStats* myStats;
    353353    double statVal;
    354354
     
    444444}
    445445
    446 psImage *psImageResample(psImage * out, const psImage * in, int scale, psImageInterpolateMode mode)
     446psImage* psImageResample(psImage* out, const psImage* in, int scale, psImageInterpolateMode mode)
    447447{
    448448    int outRows;
     
    496496}
    497497
    498 psImage *psImageRoll(psImage * out, const psImage * in, int dx, int dy)
     498psImage* psImageRoll(psImage* out, const psImage* in, int dx, int dy)
    499499{
    500500    int outRows;
     
    534534            inRowNumber -= outRows;
    535535        }
    536         psU8 *inRow = in->data.U8[inRowNumber]; // to
     536        psU8* inRow = in->data.U8[inRowNumber]; // to
    537537
    538538        // allow
     
    542542
    543543        // but for all types
    544         psU8 *outRow = out->data.U8[row];
     544        psU8* outRow = out->data.U8[row];
    545545
    546546        memcpy(outRow, inRow + segment2Size, segment1Size);
     
    551551}
    552552
    553 psImage *psImageRotate(psImage * out,
    554                        const psImage * in, float angle, float unexposedValue, psImageInterpolateMode mode)
     553psImage* psImageRotate(psImage* out,
     554                       const psImage* in, float angle, float unexposedValue, psImageInterpolateMode mode)
    555555{
    556556    if (in == NULL) {
     
    803803}
    804804
    805 psImage *psImageShift(psImage * out,
    806                       const psImage * in,
     805psImage* psImageShift(psImage* out,
     806                      const psImage* in,
    807807                      float dx, float dy, psF64 unexposedValue, psImageInterpolateMode mode)
    808808{
  • trunk/psLib/src/image/psImageManip.h

    r1426 r1440  
    1111 *  @author Ross Harman, MHPCC
    1212 *
    13  *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2004-08-09 22:44:25 $
     13 *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2004-08-09 23:34:58 $
    1515 *
    1616 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3232 *  @return int     The number of clipped pixels
    3333 */
    34 int psImageClip(psImage * input,        ///< the image to clip
     34int psImageClip(psImage* input,        ///< the image to clip
    3535                psF64 min,      ///< the minimum image value allowed
    3636                psF64 vmin,     ///< the value pixels < min are set to
     
    4848 *  @return int     The number of clipped pixels
    4949 */
    50 int psImageClipComplexRegion(psImage * input,   ///< the image to clip
     50int psImageClipComplexRegion(psImage* input,   ///< the image to clip
    5151                             psC64 min, ///< the minimum image value allowed
    5252                             psC64 vmin,        ///< the value pixels < min are set to
     
    6262 *  @return int     The number of clipped pixels
    6363 */
    64 int psImageClipNaN(psImage * input,     ///< the image to clip
     64int psImageClipNaN(psImage* input,     ///< the image to clip
    6565                   psF64 value  ///< the value to set all NaN/Inf values to
    6666                  );
     
    7777 *  @return int         0 if success, non-zero if failed.
    7878 */
    79 int psImageOverlaySection(psImage * image,      ///< target image
    80                           const psImage * overlay,      ///< the overlay image
     79int psImageOverlaySection(psImage* image,      ///< target image
     80                          const psImage* overlay,      ///< the overlay image
    8181                          int col0,     ///< the column to start overlay
    8282                          int row0,     ///< the row to start overlay
     
    9494 *  @return psImage    new image formed by rebinning input image.
    9595 */
    96 psImage *psImageRebin(psImage * out,    ///< an psImage to recycle.  If NULL, a new image is created
    97                       const psImage * in,       ///< input image
     96psImage* psImageRebin(psImage* out,    ///< an psImage to recycle.  If NULL, a new image is created
     97                      const psImage* in,       ///< input image
    9898                      unsigned int scale,       ///< the scale to rebin for each dimension
    99                       const psStats * stats     ///< the statistic to perform when rebinning.  Only one
     99                      const psStats* stats     ///< the statistic to perform when rebinning.  Only one
    100100                      // method should be set.
    101101                     );
    102102
    103 psImage *psImageResample(psImage * out, ///< an psImage to recycle.  If NULL, a new image is created
    104                          const psImage * in,    ///< input image
     103psImage* psImageResample(psImage* out, ///< an psImage to recycle.  If NULL, a new image is created
     104                         const psImage* in,    ///< input image
    105105                         int scale, psImageInterpolateMode mode);
    106106
    107 psImage *psImageRotate(psImage * out,   ///< an psImage to recycle.  If NULL, a new image is created
    108                        const psImage * in,      ///< input image
     107psImage* psImageRotate(psImage* out,   ///< an psImage to recycle.  If NULL, a new image is created
     108                       const psImage* in,      ///< input image
    109109                       float angle, float unexposedValue, psImageInterpolateMode mode);
    110110
    111 psImage *psImageShift(psImage * out,    ///< an psImage to recycle.  If NULL, a new image is created
    112                       const psImage * in,       ///< input image
     111psImage* psImageShift(psImage* out,    ///< an psImage to recycle.  If NULL, a new image is created
     112                      const psImage* in,       ///< input image
    113113                      float dx, float dy, float unexposedValue, psImageInterpolateMode mode);
    114114
     
    119119 *  defined for psU8, psS8, psS16, psF32, psF64, psC32, and psC64.
    120120 *
    121  *  @return psImage*    the rolled version of the input image.
     121 *  @return psImage* the rolled version of the input image.
    122122 */
    123 psImage *psImageRoll(psImage * out,     ///< an psImage to recycle.  If NULL, a new image is created
    124                      const psImage * in,        ///< input image
     123psImage* psImageRoll(psImage* out,     ///< an psImage to recycle.  If NULL, a new image is created
     124                     const psImage* in,        ///< input image
    125125                     int dx,    ///< number of pixels to roll in the x-dimension
    126126                     int dy     ///< number of pixels to roll in the y-dimension
  • trunk/psLib/src/image/psImageStats.c

    r1407 r1440  
    1010*  @author George Gusciora, MHPCC
    1111*
    12 *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2004-08-07 00:06:06 $
     12*  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2004-08-09 23:34:58 $
    1414*
    1515*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3737    NOTE: verify that image/mask have the correct types, and sizes.
    3838 *****************************************************************************/
    39 psStats *psImageStats(psStats * stats, psImage * in, psImage * mask, int maskVal)
    40 {
    41     psVector *junkData = NULL;
    42     psVector *junkMask = NULL;
     39psStats* psImageStats(psStats* stats, psImage* in, psImage* mask, int maskVal)
     40{
     41    psVector* junkData = NULL;
     42    psVector* junkMask = NULL;
    4343
    4444    if (stats == NULL) {
     
    9595    NOTE: verify that image/mask have the, correct types and  sizes.
    9696 *****************************************************************************/
    97 psHistogram *psImageHistogram(psHistogram * out, psImage * in, psImage * mask, unsigned int maskVal)
    98 {
    99     psVector *junkData = NULL;
    100     psVector *junkMask = NULL;
     97psHistogram* psImageHistogram(psHistogram* out, psImage* in, psImage* mask, unsigned int maskVal)
     98{
     99    psVector* junkData = NULL;
     100    psVector* junkMask = NULL;
    101101
    102102    // NOTE: Verify this action.
     
    183183}
    184184
    185 psPolynomial1D **p_psCreateChebyshevPolys(int maxChebyPoly)
    186 {
    187     psPolynomial1D **chebPolys = NULL;
     185psPolynomial1D* *p_psCreateChebyshevPolys(int maxChebyPoly)
     186{
     187    psPolynomial1D* *chebPolys = NULL;
    188188    int i = 0;
    189189    int j = 0;
    190190
    191     chebPolys = (psPolynomial1D **) psAlloc(maxChebyPoly * sizeof(psPolynomial1D *));
     191    chebPolys = (psPolynomial1D* *) psAlloc(maxChebyPoly * sizeof(psPolynomial1D* ));
    192192    for (i = 0; i < maxChebyPoly; i++) {
    193193        chebPolys[i] = psPolynomial1DAlloc(i + 1);
     
    224224        over all pixels (x,y) in the image.
    225225 *****************************************************************************/
    226 psPolynomial2D *psImageFitPolynomial(const psImage * input, psPolynomial2D * coeffs)
     226psPolynomial2D* psImageFitPolynomial(const psImage* input, psPolynomial2D* coeffs)
    227227{
    228228    int x = 0;
     
    231231    int j = 0;
    232232    float **sums = NULL;
    233     psPolynomial1D **chebPolys = NULL;
     233    psPolynomial1D* *chebPolys = NULL;
    234234    int maxChebyPoly = 0;
    235235    float *cScalingFactors = NULL;
     
    327327 
    328328 *****************************************************************************/
    329 int psImageEvalPolynomial(const psImage * input, const psPolynomial2D * coeffs)
     329int psImageEvalPolynomial(const psImage* input, const psPolynomial2D* coeffs)
    330330{
    331331    int x = 0;
     
    334334    int j = 0;
    335335    float **sums = NULL;
    336     psPolynomial1D **chebPolys = NULL;
     336    psPolynomial1D* *chebPolys = NULL;
    337337    int maxChebyPoly = 0;
    338338    float *cScalingFactors = NULL;
  • trunk/psLib/src/image/psImageStats.h

    r1426 r1440  
    1010*  @author George Gusciora, MHPCC
    1111*
    12 *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2004-08-09 22:44:25 $
     12*  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2004-08-09 23:34:58 $
    1414*
    1515*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2828
    2929/// This routine must determine the various statistics for the image.
    30 psStats *psImageStats(psStats * stats,  ///< defines statistics to be calculated
    31                       psImage * in,     ///< image (or subimage) to calculate stats
    32                       psImage * mask,   ///< mask data for image (NULL ok)
     30psStats* psImageStats(psStats* stats,  ///< defines statistics to be calculated
     31                      psImage* in,     ///< image (or subimage) to calculate stats
     32                      psImage* mask,   ///< mask data for image (NULL ok)
    3333                      int maskVal);     ///< mask Mask for mask
    3434
    35 psHistogram *psImageHistogram(psHistogram * out,        ///< input histogram description & target
    36                               psImage * in,     ///< Image data to be histogramed.
    37                               psImage * mask,   ///< mask data for image (NULL ok)
     35psHistogram* psImageHistogram(psHistogram* out,        ///< input histogram description & target
     36                              psImage* in,     ///< Image data to be histogramed.
     37                              psImage* mask,   ///< mask data for image (NULL ok)
    3838                              unsigned int maskVal);    ///< mask Mask for mask
    3939
    4040/// Fit a 2-D polynomial surface to an image.
    41 psPolynomial2D *psImageFitPolynomial(const psImage * input,     ///< image to fit
    42                                      psPolynomial2D * coeffs    ///< coefficient structure carries in
     41psPolynomial2D* psImageFitPolynomial(const psImage* input,     ///< image to fit
     42                                     psPolynomial2D* coeffs    ///< coefficient structure carries in
    4343                                     // desired terms & target
    4444                                    );
    4545
    4646/// Evaluate a 2-D polynomial surface to image pixels.
    47 int psImageEvalPolynomial(const psImage * input,        ///< image to fit
    48                           const psPolynomial2D * coeffs ///< coefficient structure carries in desired terms
     47int psImageEvalPolynomial(const psImage* input,        ///< image to fit
     48                          const psPolynomial2D* coeffs ///< coefficient structure carries in desired terms
    4949                         );
    5050
Note: See TracChangeset for help on using the changeset viewer.