IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 15, 2008, 10:29:11 AM (18 years ago)
Author:
eugene
Message:

re-org and cleanup of the mask bits to make it consistent with the pmConfigMaskSetBits concepts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppMerge/src/ppMergeLoop.c

    r18166 r18558  
    3939    float frachigh = psMetadataLookupF32(NULL, arguments, "FRACHIGH"); // Reject fraction of hi pixels
    4040    int nKeep = psMetadataLookupS32(NULL, arguments, "NKEEP"); // Minimum number of values to keep
    41     psMaskType maskVal = psMetadataLookupU8(NULL, arguments, "MASKVAL"); // Value to mask
    4241    psStatsOptions combineStat = psMetadataLookupS32(NULL, arguments, "COMBINE"); // Combination statistic
    4342    bool useWeights = psMetadataLookupBool(NULL, arguments, "WEIGHTS"); // Use weights?
     
    4948    int fringeSmoothY = psMetadataLookupS32(NULL, arguments, "FRINGE.YSMOOTH"); // Smoothing regions in y
    5049
     50    // set the mask and mark bit values based on the named masks
     51    psMaskType maskVal;
     52    psMaskType markVal;
     53    if (!pmConfigMaskSetBits (&maskVal, &markVal, config)) {
     54        psError (PS_ERR_UNKNOWN, true, "Unable to define the mask bit values");
     55        return false;
     56    }
     57
    5158    pmCombineParams *combination = pmCombineParamsAlloc(combineStat); // Combination parameters
    5259    combination->maskVal = maskVal;
    53     combination->blank = pmConfigMask("BLANK", config);
     60    combination->blank = pmConfigMaskGet("BLANK", config);
    5461    combination->nKeep = nKeep;
    5562    combination->fracHigh = frachigh;
     
    294301            }
    295302
    296             if (!ppStatsFPA(stats, outFPA, view, maskVal | pmConfigMask("BLANK", config), config)) {
     303            if (!ppStatsFPA(stats, outFPA, view, maskVal, config)) {
    297304                psError(PS_ERR_UNKNOWN, true, "Unable to generate stats for image.");
    298305                goto ERROR;
Note: See TracChangeset for help on using the changeset viewer.