IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19148


Ignore:
Timestamp:
Aug 20, 2008, 5:26:54 PM (18 years ago)
Author:
Paul Price
Message:

Propagate values from inputs masks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/imcombine/pmSubtraction.c

    r19122 r19148  
    798798    // Propagate the mask
    799799    if (subMask) {
     800        psMaskType **target = convMask->data.PS_TYPE_MASK_DATA; // Target mask
     801        psMaskType **source = subMask->data.PS_TYPE_MASK_DATA; // Source mask
     802
    800803        for (int y = yMin; y < yMax; y++) {
    801804            for (int x = xMin; x < xMax; x++) {
    802                 if (subMask->data.PS_TYPE_MASK_DATA[y][x] & maskTarget) {
    803                     convMask->data.PS_TYPE_MASK_DATA[y][x] |= blank;
     805                if (source[y][x] & maskTarget) {
     806                    target[y][x] |= blank;
    804807                }
     808            }
     809        }
     810    }
     811    if ((kernels->mode == PM_SUBTRACTION_MODE_1 || kernels->mode == PM_SUBTRACTION_MODE_DUAL) && ro1->mask) {
     812        psMaskType **target = convMask->data.PS_TYPE_MASK_DATA; // Target mask
     813        psMaskType **source = ro1->mask->data.PS_TYPE_MASK_DATA; // Source mask
     814
     815        for (int y = yMin; y < yMax; y++) {
     816            for (int x = xMin; x < xMax; x++) {
     817                target[y][x] |= source[y][x];
     818            }
     819        }
     820    }
     821    if ((kernels->mode == PM_SUBTRACTION_MODE_2 || kernels->mode == PM_SUBTRACTION_MODE_DUAL) && ro2->mask) {
     822        psMaskType **target = convMask->data.PS_TYPE_MASK_DATA; // Target mask
     823        psMaskType **source = ro2->mask->data.PS_TYPE_MASK_DATA; // Source mask
     824
     825        for (int y = yMin; y < yMax; y++) {
     826            for (int x = xMin; x < xMax; x++) {
     827                target[y][x] |= source[y][x];
    805828            }
    806829        }
Note: See TracChangeset for help on using the changeset viewer.