IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 4534


Ignore:
Timestamp:
Jul 11, 2005, 11:38:19 AM (21 years ago)
Author:
drobbin
Message:

made revisions based on psLib SDRS rev. 15

Location:
trunk/psLib
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/pslib.kdevses

    r4526 r4534  
    22<!DOCTYPE KDevPrjSession>
    33<KDevPrjSession>
    4  <DocsAndViews NumberOfDocuments="5" >
     4 <DocsAndViews NumberOfDocuments="10" >
    55  <Doc0 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/image/psImage.h" >
    6    <View0 line="53" Type="Source" />
     6   <View0 Type="Source" />
    77  </Doc0>
    8   <Doc1 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/image/psImage.c" >
    9    <View0 line="150" Type="Source" />
     8  <Doc1 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/image/psImagePixelExtract.c" >
     9   <View0 Type="Source" />
    1010  </Doc1>
    11   <Doc2 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/test/image/tst_psImageStructManip.c" >
    12    <View0 line="39" Type="Source" />
     11  <Doc2 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/image/psImageGeomManip.c" >
     12   <View0 Type="Source" />
    1313  </Doc2>
    14   <Doc3 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/dataIO/psDB.h" >
    15    <View0 line="22" Type="Source" />
     14  <Doc3 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/image/psImageGeomManip.h" >
     15   <View0 Type="Source" />
    1616  </Doc3>
    17   <Doc4 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/dataIO/psFits.h" >
    18    <View0 line="259" Type="Source" />
     17  <Doc4 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/image/psImage.c" >
     18   <View0 Type="Source" />
    1919  </Doc4>
     20  <Doc5 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/collections/psPixels.h" >
     21   <View0 Type="Source" />
     22  </Doc5>
     23  <Doc6 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/dataManip/psBinaryOp.h" >
     24   <View0 Type="Source" />
     25  </Doc6>
     26  <Doc7 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/dataManip/psBinaryOp.c" >
     27   <View0 Type="Source" />
     28  </Doc7>
     29  <Doc8 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/dataManip/psUnaryOp.h" >
     30   <View0 Type="Source" />
     31  </Doc8>
     32  <Doc9 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/dataManip/psUnaryOp.c" >
     33   <View0 line="305" Type="Source" />
     34  </Doc9>
    2035 </DocsAndViews>
    2136 <pluginList>
  • trunk/psLib/src/dataManip/psBinaryOp.c

    r4342 r4534  
    3030 *  @author Robert DeSonia, MHPCC
    3131 *
    32  *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    33  *  @date $Date: 2005-06-22 02:05:41 $
     32 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     33 *  @date $Date: 2005-07-11 21:38:19 $
    3434 *
    3535 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    426426}
    427427
    428 psPtr psBinaryOp(psPtr out, const psPtr in1, const char *op, const psPtr in2)
     428psMathType* psBinaryOp(psPtr out, const psPtr in1, const char *op, const psPtr in2)
    429429{
    430430
  • trunk/psLib/src/dataManip/psBinaryOp.h

    r4342 r4534  
    3030 *  @author Robert DeSonia, MHPCC
    3131 *
    32  *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    33  *  @date $Date: 2005-06-22 02:05:41 $
     32 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     33 *  @date $Date: 2005-07-11 21:38:19 $
    3434 *
    3535 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5555 *  @return  psType* : Pointer to either psImage or psVector.
    5656 */
    57 psType* psBinaryOp(
     57psMathType* psBinaryOp(
    5858    psPtr out,                         ///< Output type, either psImage or psVector.
    5959    const psPtr in1,                   ///< First input, either psImage or psVector.
  • trunk/psLib/src/dataManip/psUnaryOp.c

    r4409 r4534  
    3030 *  @author Robert DeSonia, MHPCC
    3131 *
    32  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    33  *  @date $Date: 2005-06-28 20:17:52 $
     32 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     33 *  @date $Date: 2005-07-11 21:38:19 $
    3434 *
    3535 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    304304}
    305305
    306 psPtr psUnaryOp(psPtr out, const psPtr in, const char *op)
     306psMathType* psUnaryOp(psPtr out, const psPtr in, const char *op)
    307307{
    308308    #define psUnaryOp_EXIT { \
  • trunk/psLib/src/dataManip/psUnaryOp.h

    r4409 r4534  
    3030 *  @author Robert DeSonia, MHPCC
    3131 *
    32  *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    33  *  @date $Date: 2005-06-28 20:17:52 $
     32 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     33 *  @date $Date: 2005-07-11 21:38:19 $
    3434 *
    3535 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5959 *  @return  psType* : Pointer to either psImage or psVector.
    6060 */
    61 psType* psUnaryOp(
     61psMathType* psUnaryOp(
    6262    psPtr out,                         ///< Output type, either psImage or psVector.
    6363    const psPtr in,                    ///< Input, either psImage or psVector.
  • trunk/psLib/src/image/psImage.c

    r4526 r4534  
    99 *  @author Ross Harman, MHPCC
    1010 *
    11  *  @version $Revision: 1.74 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-07-09 01:24:30 $
     11 *  @version $Revision: 1.75 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-07-11 21:38:19 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    369369}
    370370
    371 psC64 psImagePixelInterpolate(const psImage* input,
    372                               float x,
    373                               float y,
    374                               const psImage* mask,
    375                               psU32 maskVal,
    376                               psC64 unexposedValue,
    377                               psImageInterpolateMode mode)
     371complex psImagePixelInterpolate(const psImage* input,
     372                                float x,
     373                                float y,
     374                                const psImage* mask,
     375                                psMaskType maskVal,
     376                                complex unexposedValue,
     377                                psImageInterpolateMode mode)
    378378{
    379379
  • trunk/psLib/src/image/psImage.h

    r4526 r4534  
    1111 *  @author Ross Harman, MHPCC
    1212 *
    13  *  @version $Revision: 1.61 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2005-07-09 01:24:30 $
     13 *  @version $Revision: 1.62 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2005-07-11 21:38:19 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4040    PS_INTERPOLATE_LANCZOS3_VARIANCE,  ///< Variance version of PS_INTERPOLATE_LANCZOS3
    4141    PS_INTERPOLATE_LANCZOS4_VARIANCE,  ///< Variance version of PS_INTERPOLATE_LANCZOS4
    42     PS_INTERPOLATE_NUM_MODES           ///< enum end-marker; does not coorespond to a interpolation mode
     42    //    PS_INTERPOLATE_NUM_MODES           ///< enum end-marker; does not coorespond to a interpolation mode
    4343} psImageInterpolateMode;
    4444
     
    197197 *                   given x,y doesn't coorespond to a valid image location
    198198 */
    199 psC64 psImagePixelInterpolate(
     199complex psImagePixelInterpolate(
    200200    const psImage* input,              ///< input image for interpolation
    201201    float x,                           ///< column location to derive value of
    202202    float y,                           ///< row location ot derive value of
    203203    const psImage* mask,               ///< if not NULL, the mask of the input image
    204     psU32 maskVal,              ///< the mask value
    205     psC64 unexposedValue,              ///< return value if x,y location is not in image.
     204    psMaskType maskVal,                ///< the mask value
     205    complex unexposedValue,            ///< return value if x,y location is not in image.
    206206    psImageInterpolateMode mode        ///< interpolation mode
    207207);
  • trunk/psLib/src/image/psImageConvolve.c

    r4392 r4534  
    55 *  @author Robert DeSonia, MHPCC
    66 *
    7  *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2005-06-25 02:02:05 $
     7 *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2005-07-11 21:38:19 $
    99 *
    1010 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6565    result->image = psImageAlloc(numCols,numRows,PS_TYPE_KERNEL);
    6666    memset(result->image->rawDataBuffer,0,numCols*numRows*PSELEMTYPE_SIZEOF(PS_TYPE_KERNEL));
    67     result->p_kernelRows = psAlloc(sizeof(psKernelType*)*numRows);
    68 
    69     psKernelType** kernelRows = result->p_kernelRows;
    70     psKernelType** imageRows = result->image->data.PS_TYPE_KERNEL_DATA;
     67    result->p_kernelRows = psAlloc(sizeof(float*)*numRows);
     68
     69    float** kernelRows = result->p_kernelRows;
     70    float** imageRows = result->image->data.PS_TYPE_KERNEL_DATA;
    7171    for (psS32 i = 0; i < numRows; i++) {
    7272        kernelRows[i] = imageRows[i] - xMin;
     
    103103    psS32 yMax = 0;
    104104    psS32 length = 0;
    105     psKernelType normalizeTime = 1.0;  // fraction of total time for each shift clock
     105    float normalizeTime = 1.0;  // fraction of total time for each shift clock
    106106    psKernel* result = NULL;
    107     psKernelType** kernel = NULL;
     107    float** kernel = NULL;
    108108
    109109    // got non-NULL vectors?
     
    170170        } \
    171171        \
    172         normalizeTime = 1.0 / (psKernelType)(tShiftData[length-1]); \
     172        normalizeTime = 1.0 / (float)(tShiftData[length-1]); \
    173173        result = psKernelAlloc(xMin,xMax,yMin,yMax); \
    174174        kernel = result->kernel; \
     
    180180            y = lastY - yShiftData[i]; \
    181181            \
    182             kernel[y][x] += (psKernelType)t / (psKernelType)lastT; \
     182            kernel[y][x] += (float)t / (float)lastT; \
    183183            prevT = tShiftData[i]; \
    184184        } \
     
    216216        kernel = result->kernel; \
    217217        \
    218         normalizeTime = 1.0 / (psKernelType)t; \
     218        normalizeTime = 1.0 / (float)t; \
    219219        x = 0; \
    220220        y = 0; \
    221221        for (psS32 i = length-1; i >= 0; i--) { \
    222             kernel[y][x] += (psKernelType)(tShiftData[i]) * normalizeTime; \
     222            kernel[y][x] += (float)(tShiftData[i]) * normalizeTime; \
    223223            x -= xShiftData[i]; \
    224224            y -= yShiftData[i]; \
     
    296296    psS32 yMin = kernel->yMin;
    297297    psS32 yMax = kernel->yMax;
    298     psKernelType** kData = kernel->kernel;
     298    float** kData = kernel->kernel;
    299299
    300300    // make the output image to the proper size and type
     
    399399        // pad the kernel to the same size of paddedImage
    400400        psImage* paddedKernel = psImageAlloc(paddedCols,paddedRows,PS_TYPE_KERNEL);
    401         memset(paddedKernel->data.U8[0],0,sizeof(psKernelType)*numCols*numRows); // zero-out image
     401        memset(paddedKernel->data.U8[0],0,sizeof(float)*numCols*numRows); // zero-out image
    402402        psS32 yMax = kernel->yMax;
    403403        psS32 xMax = kernel->xMax;
     
    407407                padRow += paddedRows;
    408408            }
    409             psKernelType* padData = paddedKernel->data.PS_TYPE_KERNEL_DATA[padRow];
    410             psKernelType* kernelRow = kernel->kernel[row];
     409            float* padData = paddedKernel->data.PS_TYPE_KERNEL_DATA[padRow];
     410            float* kernelRow = kernel->kernel[row];
    411411            for (psS32 col = kernel->xMin; col <= xMax; col++) {
    412412                if (col < 0) {
  • trunk/psLib/src/image/psImageConvolve.h

    r4316 r4534  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-06-18 03:13:02 $
     9 *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-07-11 21:38:19 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2525
    2626/** Kernel Type
    27  * 
     27 *
    2828 *  A floating-point data type used for storing kernel data.
    29  * 
     29 *
    3030 */
    31 typedef psF32 psKernelType;
     31//typedef float psKernelType;
    3232
    3333/** A convolution kernel */
     
    3535{
    3636    psImage* image;                    ///< Kernel data, in the form of an image
    37     psS32 xMin;                          ///< Most negative x index
    38     psS32 yMin;                          ///< Most negative y index
    39     psS32 xMax;                          ///< Most positive x index
    40     psS32 yMax;                          ///< Most positive y index
    41     psKernelType** kernel;             ///< Pointer to the kernel data
    42     psKernelType** p_kernelRows;       ///< Pointer to the rows of the kernel data; not intended for user use.
     37    int xMin;                          ///< Most negative x index
     38    int yMin;                          ///< Most negative y index
     39    int xMax;                          ///< Most positive x index
     40    int yMax;                          ///< Most positive y index
     41    float** kernel;                    ///< Pointer to the kernel data
     42    float** p_kernelRows;              ///< Pointer to the rows of the kernel data; not intended for user use.
    4343}
    4444psKernel;
  • trunk/psLib/src/image/psImageFFT.h

    r4316 r4534  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-06-18 03:13:02 $
     9 *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-07-11 21:38:19 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3333psImage* psImageFFT(
    3434    psImage* out,                      ///< a psImage to recycle.  If NULL, a new psImage is made.
    35     const psImage* image,                 ///< the psImage to apply transform to
     35    const psImage* image,              ///< the psImage to apply transform to
    3636    psFFTFlags direction               ///< the direction of the transform
    3737);
     
    7979 */
    8080psImage* psImagePowerSpectrum(
    81     psImage* out,                       ///< a psImage to recycle.  If NULL, a new psImage is made.
    82     const psImage* in                   ///< the psImage to power spectrum of
     81    psImage* out,                      ///< a psImage to recycle.  If NULL, a new psImage is made.
     82    const psImage* in                  ///< the psImage to power spectrum of
    8383);
    8484
  • trunk/psLib/src/image/psImageGeomManip.c

    r4385 r4534  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2005-06-25 00:51:28 $
     12 *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2005-07-11 21:38:19 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    196196    }
    197197
    198     if (mode < PS_INTERPOLATE_FLAT || mode >= PS_INTERPOLATE_NUM_MODES) {
     198    if (mode > PS_INTERPOLATE_LANCZOS4_VARIANCE ) {
    199199        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    200200                PS_ERRORTEXT_psImageManip_INTERPOLATION_MODE_UNSUPPORTED,
  • trunk/psLib/src/image/psImagePixelExtract.c

    r4385 r4534  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2005-06-25 00:51:28 $
     10 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2005-07-11 21:38:19 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    312312    }
    313313
    314     if (mode < PS_INTERPOLATE_FLAT || mode >= PS_INTERPOLATE_NUM_MODES) {
     314    if (mode < PS_INTERPOLATE_FLAT ) {
    315315        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    316316                PS_ERRORTEXT_psImageManip_INTERPOLATION_MODE_UNSUPPORTED,
  • trunk/psLib/src/image/psImagePixelManip.c

    r4385 r4534  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2005-06-25 00:51:28 $
     12 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2005-07-11 21:38:19 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    185185}
    186186
    187 psS32 psImageOverlaySection(psImage* image,
    188                             const psImage* overlay,
    189                             psS32 col0,
    190                             psS32 row0,
    191                             const char *op)
     187int psImageOverlaySection(psImage* image,
     188                          const psImage* overlay,
     189                          int col0,
     190                          int row0,
     191                          const char *op)
    192192{
    193193    psU32 imageNumRows;
  • trunk/psLib/src/image/psImagePixelManip.h

    r4385 r4534  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2005-06-25 00:51:28 $
     10 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2005-07-11 21:38:19 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    7878 *  function is defined for psU8, psS8, psS16, psF32, psF64, psC32, and psC64.
    7979 *
    80  *  @return psS32         0 if success, non-zero if failed.
     80 *  @return int         0 if success, non-zero if failed.
    8181 */
    82 psS32 psImageOverlaySection(
     82int psImageOverlaySection(
    8383    psImage* image,                    ///< target image
    8484    const psImage* overlay,            ///< the overlay image
    85     psS32 col0,                        ///< the column to start overlay
    86     psS32 row0,                        ///< the row to start overlay
     85    int col0,                          ///< the column to start overlay
     86    int row0,                          ///< the row to start overlay
    8787    const char *op                     ///< the operation to perform for overlay
    8888);
  • trunk/psLib/test/image/tst_psImageConvolve.c

    r3702 r4534  
    55 *  @author Robert DeSonia, MHPCC
    66 *
    7  *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2005-04-15 00:12:09 $
     7 *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2005-07-11 21:38:19 $
    99 *
    1010 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    121121    psS32 x[] = { 0, 1, 0, -1, 0 };
    122122    psS32 y[] = { 2, 1, -1, -2, 0 };
    123     psKernelType sum;
     123    float sum;
    124124
    125125    psVector* xVec = psVectorAlloc(size,PS_TYPE_U32);
Note: See TracChangeset for help on using the changeset viewer.