IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 3, 2004, 4:02:10 PM (22 years ago)
Author:
desonia
Message:

fixed problems with psError and associate parameter checking macros.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/pmMaskBadPixels.c

    r2138 r2275  
    1919 *  @author Ross Harman, MHPCC
    2020 *
    21  *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
    22  *  @date $Date: 2004-10-14 23:52:09 $
     21 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
     22 *  @date $Date: 2004-11-04 02:02:10 $
    2323 *
    2424 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    6161        return true;   // Readout may not have data in it
    6262    } else if(mask==NULL) {
    63         psErrorMsg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels", PS_ERR_BAD_PARAMETER_NULL, true,
    64                    PS_ERRORTEXT_pmMaskBadPixels_NULL_MASK_IMAGE);
     63        psError( PS_ERR_BAD_PARAMETER_NULL, true,
     64                 PS_ERRORTEXT_pmMaskBadPixels_NULL_MASK_IMAGE);
    6565        return false;
    6666    }
     
    6868    inImage = in->image;
    6969    if (inImage == NULL) {
    70         psErrorMsg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels", PS_ERR_BAD_PARAMETER_NULL, true,
    71                    PS_ERRORTEXT_pmMaskBadPixels_NULL_INPUT_IMAGE);
     70        psError( PS_ERR_BAD_PARAMETER_NULL, true,
     71                 PS_ERRORTEXT_pmMaskBadPixels_NULL_INPUT_IMAGE);
    7272        return false;
    7373    } else if(in->mask == NULL) {
     
    7979    // Check input image and its mask are not larger than mask
    8080    if(inImage->numRows > mask->numRows || inImage->numCols > mask->numCols) {
    81         psErrorMsg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels", PS_ERR_BAD_PARAMETER_SIZE, true,
    82                    PS_ERRORTEXT_pmMaskBadPixels_SIZE_INPUT_IMAGE,
    83                    inImage->numRows, inImage->numCols, mask->numRows, mask->numCols);
     81        psError( PS_ERR_BAD_PARAMETER_SIZE, true,
     82                 PS_ERRORTEXT_pmMaskBadPixels_SIZE_INPUT_IMAGE,
     83                 inImage->numRows, inImage->numCols, mask->numRows, mask->numCols);
    8484        return false;
    8585    } else if(inMask->numRows>mask->numRows || inMask->numCols>mask->numCols) {
    86         psErrorMsg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels", PS_ERR_BAD_PARAMETER_SIZE, true,
    87                    PS_ERRORTEXT_pmMaskBadPixels_SIZE_MASK_IMAGE,
    88                    inMask->numRows, inMask->numCols, mask->numRows, mask->numCols);
     86        psError( PS_ERR_BAD_PARAMETER_SIZE, true,
     87                 PS_ERRORTEXT_pmMaskBadPixels_SIZE_MASK_IMAGE,
     88                 inMask->numRows, inMask->numCols, mask->numRows, mask->numCols);
    8989        return false;
    9090    }
     
    9696    // Check that offsets are within image limits
    9797    if(totOffRow>=mask->numRows || totOffCol>=mask->numCols) {
    98         psErrorMsg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels", PS_ERR_BAD_PARAMETER_SIZE, true,
    99                    PS_ERRORTEXT_pmMaskBadPixels_OFFSET_MASK_IMAGE,
    100                    totOffRow, totOffCol, mask->numRows, mask->numCols);
     98        psError( PS_ERR_BAD_PARAMETER_SIZE, true,
     99                 PS_ERRORTEXT_pmMaskBadPixels_OFFSET_MASK_IMAGE,
     100                 totOffRow, totOffCol, mask->numRows, mask->numCols);
    101101        return false;
    102102    } else if(totOffRow>=inImage->numRows || totOffCol>=inImage->numCols) {
    103         psErrorMsg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels", PS_ERR_BAD_PARAMETER_SIZE, true,
    104                    PS_ERRORTEXT_pmMaskBadPixels_OFFSET_INPUT_IMAGE,
    105                    totOffRow, totOffCol, inImage->numRows, inImage->numCols);
     103        psError( PS_ERR_BAD_PARAMETER_SIZE, true,
     104                 PS_ERRORTEXT_pmMaskBadPixels_OFFSET_INPUT_IMAGE,
     105                 totOffRow, totOffCol, inImage->numRows, inImage->numCols);
    106106        return false;
    107107    } else if(totOffRow>=inMask->numRows || totOffCol>=inMask->numCols) {
    108         psErrorMsg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels", PS_ERR_BAD_PARAMETER_SIZE, true,
    109                    PS_ERRORTEXT_pmMaskBadPixels_OFFSET_INPUT_IMAGE_MASK,
    110                    totOffRow, totOffCol, inMask->numRows, inMask->numCols);
     108        psError( PS_ERR_BAD_PARAMETER_SIZE, true,
     109                 PS_ERRORTEXT_pmMaskBadPixels_OFFSET_INPUT_IMAGE_MASK,
     110                 totOffRow, totOffCol, inMask->numRows, inMask->numCols);
    111111        return false;
    112112    }
     
    116116    maskType = mask->type.type;
    117117    if(PS_IS_PSELEMTYPE_COMPLEX(inType)) {
    118         psErrorMsg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels", PS_ERR_BAD_PARAMETER_TYPE, true,
    119                    PS_ERRORTEXT_pmMaskBadPixels_TYPE_INPUT_IMAGE,
    120                    inType);
     118        psError( PS_ERR_BAD_PARAMETER_TYPE, true,
     119                 PS_ERRORTEXT_pmMaskBadPixels_TYPE_INPUT_IMAGE,
     120                 inType);
    121121        return false;
    122122    } else if(maskType!=PS_TYPE_MASK) {
    123         psErrorMsg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels", PS_ERR_BAD_PARAMETER_TYPE, true,
    124                    PS_ERRORTEXT_pmMaskBadPixels_TYPE_MASK_IMAGE,
    125                    maskType);
     123        psError( PS_ERR_BAD_PARAMETER_TYPE, true,
     124                 PS_ERRORTEXT_pmMaskBadPixels_TYPE_MASK_IMAGE,
     125                 maskType);
    126126        return false;
    127127    }
     
    175175        PM_BAD_PIXELS(F64);
    176176    default:
    177         psErrorMsg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels", PS_ERR_BAD_PARAMETER_TYPE, true,
    178                    PS_ERRORTEXT_pmMaskBadPixels_TYPE_UNSUPPORTED,
    179                    inType);
     177        psError( PS_ERR_BAD_PARAMETER_TYPE, true,
     178                 PS_ERRORTEXT_pmMaskBadPixels_TYPE_UNSUPPORTED,
     179                 inType);
    180180    }
    181181
Note: See TracChangeset for help on using the changeset viewer.