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/pswarp/src/pswarpLoop.c

    r18189 r18558  
    6464bool pswarpLoop(pmConfig *config)
    6565{
    66 
    67     psMaskType maskPoor = psMetadataLookupU8(NULL, config->arguments, "MASK.POOR"); // Mask for "poor" data
    68     psMaskType maskBad = psMetadataLookupU8(NULL, config->arguments, "MASK.BAD"); // Mask for bad data
     66    bool status;
     67
     68    // load the recipe
     69    psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSWARP_RECIPE);
     70    if (!recipe) {
     71        psError(PSPHOT_ERR_CONFIG, false, "missing recipe %s", PSWARP_RECIPE);
     72        return false;
     73    }
     74
     75    // output mask bits
     76    psMaskType maskValue = psMetadataLookupU8(&status, recipe, "MASK.OUTPUT");
     77    psAssert (status, "MASK.OUTPUT was not defined");
    6978
    7079    // select the input data sources
     
    333342    // Perform statistics on the output image
    334343    if (stats) {
    335         if (!ppStatsFPA(stats, output->parent->parent->parent, view, maskBad | maskPoor, config)) {
     344        if (!ppStatsFPA(stats, output->parent->parent->parent, view, maskValue, config)) {
    336345            psWarning("Unable to perform statistics on warped image.");
    337346        }
Note: See TracChangeset for help on using the changeset viewer.