IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 4385


Ignore:
Timestamp:
Jun 24, 2005, 2:51:28 PM (21 years ago)
Author:
drobbin
Message:

made request argument changes (apidelta-report-cycle6)

Location:
trunk/psLib
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/pslib.kdevses

    r4367 r4385  
    22<!DOCTYPE KDevPrjSession>
    33<KDevPrjSession>
    4  <DocsAndViews NumberOfDocuments="0" />
     4 <DocsAndViews NumberOfDocuments="2" >
     5  <Doc0 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/dataManip/psMatrix.h" >
     6   <View0 line="77" Type="Source" />
     7  </Doc0>
     8  <Doc1 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/dataManip/psMatrix.c" >
     9   <View0 line="345" Type="Source" />
     10  </Doc1>
     11 </DocsAndViews>
    512 <pluginList>
    613  <kdevbookmarks>
    7    <bookmarks/>
     14   <bookmarks>
     15    <bookmark url="/home/drobbin/panstarrs/psLib/src/sysUtils/psType.h" >
     16     <mark line="69" />
     17    </bookmark>
     18   </bookmarks>
    819  </kdevbookmarks>
    920  <kdevvalgrind>
  • trunk/psLib/src/dataManip/psMatrix.c

    r4321 r4385  
    2121 *  @author Robert DeSonia, MHPCC
    2222 *
    23  *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
    24  *  @date $Date: 2005-06-20 22:42:29 $
     23 *  @version $Revision: 1.33 $ $Name: not supported by cvs2svn $
     24 *  @date $Date: 2005-06-25 00:51:28 $
    2525 *
    2626 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    298298}
    299299
    300 psImage* psMatrixInvert(psImage* outImage, const psImage* inImage, float *det)
     300psImage* psMatrixInvert(psImage* out, const psImage* in, float *determinant)
    301301{
    302302    psS32 signum = 0;
     
    307307    gsl_permutation *perm = NULL;
    308308
    309     #define INVERT_CLEANUP { psFree(outImage); return NULL; }
    310     // Error checks
    311     PS_ASSERT_GENERAL_PTR_NON_NULL(det, INVERT_CLEANUP);
    312     PS_ASSERT_GENERAL_IMAGE_NON_NULL(inImage, INVERT_CLEANUP);
    313     PS_CHECK_POINTERS(inImage, outImage, INVERT_CLEANUP);
    314     PS_CHECK_DIMEN_AND_TYPE(inImage, PS_DIMEN_IMAGE, INVERT_CLEANUP);
    315     PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(inImage, INVERT_CLEANUP);
    316 
    317     outImage = psImageRecycle(outImage, inImage->numCols, inImage->numRows, inImage->type.type);
    318 
    319     PS_CHECK_SQUARE(inImage, INVERT_CLEANUP);
    320     PS_CHECK_SQUARE(outImage, INVERT_CLEANUP);
     309    #define INVERT_CLEANUP { psFree(out); return NULL; }
     310    // Error checks
     311    PS_ASSERT_GENERAL_PTR_NON_NULL(determinant, INVERT_CLEANUP);
     312    PS_ASSERT_GENERAL_IMAGE_NON_NULL(in, INVERT_CLEANUP);
     313    PS_CHECK_POINTERS(in, out, INVERT_CLEANUP);
     314    PS_CHECK_DIMEN_AND_TYPE(in, PS_DIMEN_IMAGE, INVERT_CLEANUP);
     315    PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(in, INVERT_CLEANUP);
     316
     317    out = psImageRecycle(out, in->numCols, in->numRows, in->type.type);
     318
     319    PS_CHECK_SQUARE(in, INVERT_CLEANUP);
     320    PS_CHECK_SQUARE(out, INVERT_CLEANUP);
    321321
    322322    // Initialize data
    323     numRows = inImage->numRows;
    324     numCols = inImage->numCols;
     323    numRows = in->numRows;
     324    numCols = in->numCols;
    325325
    326326    // Initialize GSL data
     
    328328    lu = gsl_matrix_alloc(numRows, numCols);
    329329    inv = gsl_matrix_alloc(numRows, numCols);
    330     psImageToGslMatrix(lu, inImage);
     330    psImageToGslMatrix(lu, in);
    331331
    332332    // Invert data and calculate determinant
    333333    gsl_linalg_LU_decomp(lu, perm, &signum);
    334334    gsl_linalg_LU_invert(lu, perm, inv);
    335     *det = (float)gsl_linalg_LU_det(lu, signum);
     335    *determinant = (float)gsl_linalg_LU_det(lu, signum);
    336336
    337337    // Copy GSL matrix data to psImage data
    338     gslMatrixToPsImage(outImage, inv);
     338    gslMatrixToPsImage(out, inv);
    339339
    340340    // Free GSL structs
     
    343343    gsl_matrix_free(inv);
    344344
    345     return outImage;
     345    return out;
    346346}
    347347
  • trunk/psLib/src/dataManip/psMatrix.h

    r4321 r4385  
    2121 *  @author Ross Harman, MHPCC
    2222 *
    23  *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
    24  *  @date $Date: 2005-06-20 22:42:29 $
     23 *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
     24 *  @date $Date: 2005-06-25 00:51:28 $
    2525 *
    2626 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    7474 */
    7575psImage* psMatrixInvert(
    76     psImage* outImage,                 ///< Image to return, or NULL for in-place substitution.
    77     const psImage* inImage,            ///< Image to be inverted
     76    psImage* out,                 ///< Image to return, or NULL for in-place substitution.
     77    const psImage* in,            ///< Image to be inverted
    7878    float *det                         ///< Determinant to return, or NULL
    7979);
  • trunk/psLib/src/image/psImageGeomManip.c

    r4367 r4385  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2005-06-23 03:50:29 $
     12 *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2005-06-25 00:51:28 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    305305                       const psImage* input,
    306306                       float angle,
    307                        _Complex exposed,
     307                       complex exposed,
    308308                       psImageInterpolateMode mode)
    309309{
     
    597597                      float dx,
    598598                      float dy,
    599                       _Complex exposed,
     599                      complex exposed,
    600600                      psImageInterpolateMode mode)
    601601{
     
    692692                          const psImage *input,
    693693                          const psImage *inputMask,
    694                           int inputMaskVal,
     694                          psMaskType inputMaskVal,
    695695                          const psPlaneTransform *outToIn,
    696696                          psRegion region,
  • trunk/psLib/src/image/psImageGeomManip.h

    r4367 r4385  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2005-06-23 03:50:29 $
     10 *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2005-06-25 00:51:28 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    7777    const psImage* input,              ///< input image
    7878    float angle,                       ///< the rotation angle in radians.
    79     _Complex exposed,                  ///< the output image pixel values for non-imagery areas
     79    complex exposed,                   ///< the output image pixel values for non-imagery areas
    8080    psImageInterpolateMode mode        ///< the interpolation mode used
    8181);
     
    9797    float dx,                          ///< the shift in x direction.
    9898    float dy,                          ///< the shift in y direction.
    99     _Complex exposed,                  ///< the output image pixel values for non-imagery areas
     99    complex exposed,                   ///< the output image pixel values for non-imagery areas
    100100    psImageInterpolateMode mode        ///< the interpolation mode to use
    101101);
     
    147147    const psImage *input,              ///< psImage to apply transform to
    148148    const psImage *inputMask,          ///< if not NULL, mask of input psImage
    149     int inputMaskVal,                  ///< masking value for inputMask
     149    psMaskType inputMaskVal,           ///< masking value for inputMask
    150150    const psPlaneTransform *outToIn,   ///< the transform to apply
    151151    psRegion region,                   ///< the size of the transformed image
    152152    const psPixels* pixels,            /**< if not NULL, consists of psPixelCoords and specifies which pixels in
    153                                                          *  output image shall be transformed; otherwise, entire image generated*/
     153                                                             *  output image shall be transformed; otherwise, entire image generated*/
    154154    psImageInterpolateMode mode,       ///< the interpolation scheme to be used
    155155    double exposedValue                   ///< Exposed value to which non-corresponding pixels are set
  • trunk/psLib/src/image/psImagePixelExtract.c

    r4367 r4385  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2005-06-23 03:50:29 $
     10 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2005-06-25 00:51:28 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2727                       const psImage* restrict input,
    2828                       const psImage* restrict mask,
    29                        psU32 maskVal,
     29                       psMaskType maskVal,
    3030                       psRegion region,
    3131                       psImageCutDirection direction,
     
    273273                     const psImage* input,
    274274                     const psImage* mask,
    275                      psU32 maskVal,
     275                     psMaskType maskVal,
    276276                     psRegion region,
    277277                     unsigned int nSamples,
     
    407407                           const psImage* input,
    408408                           const psImage* restrict mask,
    409                            psU32 maskVal,
     409                           psMaskType maskVal,
    410410                           float x,
    411411                           float y,
  • trunk/psLib/src/image/psImagePixelExtract.h

    r4367 r4385  
    88*  @author Robert DeSonia, MHPCC
    99*
    10 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    11 *  @date $Date: 2005-06-23 03:50:29 $
     10*  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     11*  @date $Date: 2005-06-25 00:51:28 $
    1212*
    1313*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6464    const psImage* input,              ///< the input image in which to perform the slice
    6565    const psImage* mask,               ///< the mask for the input image.
    66     psU32 maskVal,                     ///< the mask value to apply to the mask
     66    psMaskType maskVal,                ///< the mask value to apply to the mask
    6767    psRegion region,                   ///< the slice region
    6868    psImageCutDirection direction,     ///< the slice dimension and direction
     
    8484 *  psF64.
    8585 *
    86  *  @return psVector    resulting vector
     86 *  @return psVector*    resulting vector
    8787 */
    8888psVector* psImageCut(
     
    9292    const psImage* input,              ///< the input image in which to perform the cut
    9393    const psImage* mask,               ///< the mask for the input image.
    94     psU32 maskVal,                     ///< the mask value to apply to the mask
     94    psMaskType maskVal,                ///< the mask value to apply to the mask
    9595    psRegion region,                   ///< the start and end points to cut along
    9696    unsigned int nSamples,             ///< the number of samples along the cut
     
    115115    const psImage* input,              ///< the input image in which to perform the cut
    116116    const psImage* mask,               ///< the mask for the input image.
    117     psU32 maskVal,                     ///< the mask value to apply to the mask
     117    psMaskType maskVal,                ///< the mask value to apply to the mask
    118118    float x,                           ///< the column of the center of the cut circle
    119119    float y,                           ///< the row of the center of the cut circle
  • trunk/psLib/src/image/psImagePixelManip.c

    r4367 r4385  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2005-06-23 03:50:29 $
     12 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2005-06-25 00:51:28 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    311311
    312312int psImageClipComplexRegion(psImage* input,
    313                              _Complex min,
    314                              _Complex vmin,
    315                              _Complex max,
    316                              _Complex vmax)
     313                             complex min,
     314                             complex vmin,
     315                             complex max,
     316                             complex vmax)
    317317{
    318318    psS32 numClipped = 0;
  • trunk/psLib/src/image/psImagePixelManip.h

    r4367 r4385  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2005-06-23 03:50:29 $
     10 *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2005-06-25 00:51:28 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5151int psImageClipComplexRegion(
    5252    psImage* input,                    ///< the image to clip
    53     _Complex min,                      ///< the minimum image value allowed
    54     _Complex vmin,                     ///< the value pixels < min are set to
    55     _Complex max,                      ///< the maximum image value allowed
    56     _Complex vmax                      ///< the value pixels > max are set to
     53    complex min,                       ///< the minimum image value allowed
     54    complex vmin,                      ///< the value pixels < min are set to
     55    complex max,                       ///< the maximum image value allowed
     56    complex vmax                       ///< the value pixels > max are set to
    5757);
    5858
  • trunk/psLib/src/image/psImageStats.c

    r4029 r4385  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.74 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-05-25 20:26:55 $
     11 *  @version $Revision: 1.75 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-06-25 00:51:28 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4747                      const psImage* in,
    4848                      const psImage* mask,
    49                       psS32 maskVal)
     49                      psMaskType maskVal)
    5050{
    5151    psVector *junkData = NULL;
     
    122122                              const psImage* in,
    123123                              const psImage* mask,
    124                               psU32 maskVal)
     124                              psMaskType maskVal)
    125125{
    126126    PS_ASSERT_PTR_NON_NULL(out, NULL);
  • trunk/psLib/src/image/psImageStats.h

    r4243 r4385  
    99*  @author GLG, MHPCC
    1010*
    11 *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2005-06-14 02:54:15 $
     11*  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2005-06-25 00:51:28 $
    1313*
    1414*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4040    const psImage* in,                 ///< image (or subimage) to calculate stats
    4141    const psImage* mask,               ///< mask data for image (NULL ok)
    42     psS32 maskVal                      ///< mask Mask for mask
     42    psMaskType maskVal                 ///< mask value for mask
    4343);
    4444
     
    5555    const psImage* in,                 ///< Image data to be histogramed.
    5656    const psImage* mask,               ///< mask data for image (NULL ok)
    57     psU32 maskVal                      ///< mask Mask for mask
     57    psMaskType maskVal                 ///< mask Mask for mask
    5858);
    5959
  • trunk/psLib/src/imageops/psImageGeomManip.c

    r4367 r4385  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2005-06-23 03:50:29 $
     12 *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2005-06-25 00:51:28 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    305305                       const psImage* input,
    306306                       float angle,
    307                        _Complex exposed,
     307                       complex exposed,
    308308                       psImageInterpolateMode mode)
    309309{
     
    597597                      float dx,
    598598                      float dy,
    599                       _Complex exposed,
     599                      complex exposed,
    600600                      psImageInterpolateMode mode)
    601601{
     
    692692                          const psImage *input,
    693693                          const psImage *inputMask,
    694                           int inputMaskVal,
     694                          psMaskType inputMaskVal,
    695695                          const psPlaneTransform *outToIn,
    696696                          psRegion region,
  • trunk/psLib/src/imageops/psImageGeomManip.h

    r4367 r4385  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2005-06-23 03:50:29 $
     10 *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2005-06-25 00:51:28 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    7777    const psImage* input,              ///< input image
    7878    float angle,                       ///< the rotation angle in radians.
    79     _Complex exposed,                  ///< the output image pixel values for non-imagery areas
     79    complex exposed,                   ///< the output image pixel values for non-imagery areas
    8080    psImageInterpolateMode mode        ///< the interpolation mode used
    8181);
     
    9797    float dx,                          ///< the shift in x direction.
    9898    float dy,                          ///< the shift in y direction.
    99     _Complex exposed,                  ///< the output image pixel values for non-imagery areas
     99    complex exposed,                   ///< the output image pixel values for non-imagery areas
    100100    psImageInterpolateMode mode        ///< the interpolation mode to use
    101101);
     
    147147    const psImage *input,              ///< psImage to apply transform to
    148148    const psImage *inputMask,          ///< if not NULL, mask of input psImage
    149     int inputMaskVal,                  ///< masking value for inputMask
     149    psMaskType inputMaskVal,           ///< masking value for inputMask
    150150    const psPlaneTransform *outToIn,   ///< the transform to apply
    151151    psRegion region,                   ///< the size of the transformed image
    152152    const psPixels* pixels,            /**< if not NULL, consists of psPixelCoords and specifies which pixels in
    153                                                          *  output image shall be transformed; otherwise, entire image generated*/
     153                                                             *  output image shall be transformed; otherwise, entire image generated*/
    154154    psImageInterpolateMode mode,       ///< the interpolation scheme to be used
    155155    double exposedValue                   ///< Exposed value to which non-corresponding pixels are set
  • trunk/psLib/src/imageops/psImagePixelExtract.c

    r4367 r4385  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2005-06-23 03:50:29 $
     10 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2005-06-25 00:51:28 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2727                       const psImage* restrict input,
    2828                       const psImage* restrict mask,
    29                        psU32 maskVal,
     29                       psMaskType maskVal,
    3030                       psRegion region,
    3131                       psImageCutDirection direction,
     
    273273                     const psImage* input,
    274274                     const psImage* mask,
    275                      psU32 maskVal,
     275                     psMaskType maskVal,
    276276                     psRegion region,
    277277                     unsigned int nSamples,
     
    407407                           const psImage* input,
    408408                           const psImage* restrict mask,
    409                            psU32 maskVal,
     409                           psMaskType maskVal,
    410410                           float x,
    411411                           float y,
  • trunk/psLib/src/imageops/psImagePixelExtract.h

    r4367 r4385  
    88*  @author Robert DeSonia, MHPCC
    99*
    10 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    11 *  @date $Date: 2005-06-23 03:50:29 $
     10*  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     11*  @date $Date: 2005-06-25 00:51:28 $
    1212*
    1313*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6464    const psImage* input,              ///< the input image in which to perform the slice
    6565    const psImage* mask,               ///< the mask for the input image.
    66     psU32 maskVal,                     ///< the mask value to apply to the mask
     66    psMaskType maskVal,                ///< the mask value to apply to the mask
    6767    psRegion region,                   ///< the slice region
    6868    psImageCutDirection direction,     ///< the slice dimension and direction
     
    8484 *  psF64.
    8585 *
    86  *  @return psVector    resulting vector
     86 *  @return psVector*    resulting vector
    8787 */
    8888psVector* psImageCut(
     
    9292    const psImage* input,              ///< the input image in which to perform the cut
    9393    const psImage* mask,               ///< the mask for the input image.
    94     psU32 maskVal,                     ///< the mask value to apply to the mask
     94    psMaskType maskVal,                ///< the mask value to apply to the mask
    9595    psRegion region,                   ///< the start and end points to cut along
    9696    unsigned int nSamples,             ///< the number of samples along the cut
     
    115115    const psImage* input,              ///< the input image in which to perform the cut
    116116    const psImage* mask,               ///< the mask for the input image.
    117     psU32 maskVal,                     ///< the mask value to apply to the mask
     117    psMaskType maskVal,                ///< the mask value to apply to the mask
    118118    float x,                           ///< the column of the center of the cut circle
    119119    float y,                           ///< the row of the center of the cut circle
  • trunk/psLib/src/imageops/psImagePixelManip.c

    r4367 r4385  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2005-06-23 03:50:29 $
     12 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2005-06-25 00:51:28 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    311311
    312312int psImageClipComplexRegion(psImage* input,
    313                              _Complex min,
    314                              _Complex vmin,
    315                              _Complex max,
    316                              _Complex vmax)
     313                             complex min,
     314                             complex vmin,
     315                             complex max,
     316                             complex vmax)
    317317{
    318318    psS32 numClipped = 0;
  • trunk/psLib/src/imageops/psImagePixelManip.h

    r4367 r4385  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2005-06-23 03:50:29 $
     10 *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2005-06-25 00:51:28 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5151int psImageClipComplexRegion(
    5252    psImage* input,                    ///< the image to clip
    53     _Complex min,                      ///< the minimum image value allowed
    54     _Complex vmin,                     ///< the value pixels < min are set to
    55     _Complex max,                      ///< the maximum image value allowed
    56     _Complex vmax                      ///< the value pixels > max are set to
     53    complex min,                       ///< the minimum image value allowed
     54    complex vmin,                      ///< the value pixels < min are set to
     55    complex max,                       ///< the maximum image value allowed
     56    complex vmax                       ///< the value pixels > max are set to
    5757);
    5858
  • trunk/psLib/src/imageops/psImageStats.c

    r4029 r4385  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.74 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-05-25 20:26:55 $
     11 *  @version $Revision: 1.75 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-06-25 00:51:28 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4747                      const psImage* in,
    4848                      const psImage* mask,
    49                       psS32 maskVal)
     49                      psMaskType maskVal)
    5050{
    5151    psVector *junkData = NULL;
     
    122122                              const psImage* in,
    123123                              const psImage* mask,
    124                               psU32 maskVal)
     124                              psMaskType maskVal)
    125125{
    126126    PS_ASSERT_PTR_NON_NULL(out, NULL);
  • trunk/psLib/src/imageops/psImageStats.h

    r4243 r4385  
    99*  @author GLG, MHPCC
    1010*
    11 *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2005-06-14 02:54:15 $
     11*  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2005-06-25 00:51:28 $
    1313*
    1414*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4040    const psImage* in,                 ///< image (or subimage) to calculate stats
    4141    const psImage* mask,               ///< mask data for image (NULL ok)
    42     psS32 maskVal                      ///< mask Mask for mask
     42    psMaskType maskVal                 ///< mask value for mask
    4343);
    4444
     
    5555    const psImage* in,                 ///< Image data to be histogramed.
    5656    const psImage* mask,               ///< mask data for image (NULL ok)
    57     psU32 maskVal                      ///< mask Mask for mask
     57    psMaskType maskVal                 ///< mask Mask for mask
    5858);
    5959
  • trunk/psLib/src/math/psMatrix.c

    r4321 r4385  
    2121 *  @author Robert DeSonia, MHPCC
    2222 *
    23  *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
    24  *  @date $Date: 2005-06-20 22:42:29 $
     23 *  @version $Revision: 1.33 $ $Name: not supported by cvs2svn $
     24 *  @date $Date: 2005-06-25 00:51:28 $
    2525 *
    2626 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    298298}
    299299
    300 psImage* psMatrixInvert(psImage* outImage, const psImage* inImage, float *det)
     300psImage* psMatrixInvert(psImage* out, const psImage* in, float *determinant)
    301301{
    302302    psS32 signum = 0;
     
    307307    gsl_permutation *perm = NULL;
    308308
    309     #define INVERT_CLEANUP { psFree(outImage); return NULL; }
    310     // Error checks
    311     PS_ASSERT_GENERAL_PTR_NON_NULL(det, INVERT_CLEANUP);
    312     PS_ASSERT_GENERAL_IMAGE_NON_NULL(inImage, INVERT_CLEANUP);
    313     PS_CHECK_POINTERS(inImage, outImage, INVERT_CLEANUP);
    314     PS_CHECK_DIMEN_AND_TYPE(inImage, PS_DIMEN_IMAGE, INVERT_CLEANUP);
    315     PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(inImage, INVERT_CLEANUP);
    316 
    317     outImage = psImageRecycle(outImage, inImage->numCols, inImage->numRows, inImage->type.type);
    318 
    319     PS_CHECK_SQUARE(inImage, INVERT_CLEANUP);
    320     PS_CHECK_SQUARE(outImage, INVERT_CLEANUP);
     309    #define INVERT_CLEANUP { psFree(out); return NULL; }
     310    // Error checks
     311    PS_ASSERT_GENERAL_PTR_NON_NULL(determinant, INVERT_CLEANUP);
     312    PS_ASSERT_GENERAL_IMAGE_NON_NULL(in, INVERT_CLEANUP);
     313    PS_CHECK_POINTERS(in, out, INVERT_CLEANUP);
     314    PS_CHECK_DIMEN_AND_TYPE(in, PS_DIMEN_IMAGE, INVERT_CLEANUP);
     315    PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(in, INVERT_CLEANUP);
     316
     317    out = psImageRecycle(out, in->numCols, in->numRows, in->type.type);
     318
     319    PS_CHECK_SQUARE(in, INVERT_CLEANUP);
     320    PS_CHECK_SQUARE(out, INVERT_CLEANUP);
    321321
    322322    // Initialize data
    323     numRows = inImage->numRows;
    324     numCols = inImage->numCols;
     323    numRows = in->numRows;
     324    numCols = in->numCols;
    325325
    326326    // Initialize GSL data
     
    328328    lu = gsl_matrix_alloc(numRows, numCols);
    329329    inv = gsl_matrix_alloc(numRows, numCols);
    330     psImageToGslMatrix(lu, inImage);
     330    psImageToGslMatrix(lu, in);
    331331
    332332    // Invert data and calculate determinant
    333333    gsl_linalg_LU_decomp(lu, perm, &signum);
    334334    gsl_linalg_LU_invert(lu, perm, inv);
    335     *det = (float)gsl_linalg_LU_det(lu, signum);
     335    *determinant = (float)gsl_linalg_LU_det(lu, signum);
    336336
    337337    // Copy GSL matrix data to psImage data
    338     gslMatrixToPsImage(outImage, inv);
     338    gslMatrixToPsImage(out, inv);
    339339
    340340    // Free GSL structs
     
    343343    gsl_matrix_free(inv);
    344344
    345     return outImage;
     345    return out;
    346346}
    347347
  • trunk/psLib/src/math/psMatrix.h

    r4321 r4385  
    2121 *  @author Ross Harman, MHPCC
    2222 *
    23  *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
    24  *  @date $Date: 2005-06-20 22:42:29 $
     23 *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
     24 *  @date $Date: 2005-06-25 00:51:28 $
    2525 *
    2626 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    7474 */
    7575psImage* psMatrixInvert(
    76     psImage* outImage,                 ///< Image to return, or NULL for in-place substitution.
    77     const psImage* inImage,            ///< Image to be inverted
     76    psImage* out,                 ///< Image to return, or NULL for in-place substitution.
     77    const psImage* in,            ///< Image to be inverted
    7878    float *det                         ///< Determinant to return, or NULL
    7979);
  • trunk/psLib/test/dataManip/verified/tst_psMatrix04.stderr

    r3127 r4385  
    11<DATE><TIME>|<HOST>|E|psMatrixInvert (FILE:LINENO)
    2     Unallowable operation: psImage inImage or its data is NULL.
     2    Unallowable operation: psImage in or its data is NULL.
    33<DATE><TIME>|<HOST>|E|psMatrixInvert (FILE:LINENO)
    4     Unallowable operation: det is NULL.
     4    Unallowable operation: determinant is NULL.
Note: See TracChangeset for help on using the changeset viewer.