IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 1, 2007, 5:51:03 PM (19 years ago)
Author:
Paul Price
Message:

Adding pmConfigMask to use symbolic names for mask values. Need to adapt APIs that use mask values to accept the values for those masks (which can be obtained from pmConfigMask).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPAMaskWeight.c

    r12696 r13591  
    9393//////////////////////////////////////////////////////////////////////////////////////////////////////////////
    9494
    95 bool pmReadoutSetMask(pmReadout *readout)
     95bool pmReadoutSetMask(pmReadout *readout, psMaskType satMask, psMaskType badMask)
    9696{
    9797    PS_ASSERT_PTR_NON_NULL(readout, false);
     
    131131        for (int j = 0; j < image->numCols; j++) {
    132132            if (imageData[i][j] >= saturation) {
    133                 maskData[i][j] |= PM_MASK_SAT;
     133                maskData[i][j] |= satMask;
    134134            }
    135135            if (imageData[i][j] <= bad) {
    136                 maskData[i][j] |= PM_MASK_BAD;
     136                maskData[i][j] |= badMask;
    137137            }
    138138        }
     
    145145// pixels.  currently, it will set mask bits if (value <= BAD) or (value >= SATURATION)
    146146// should we optionally ignore these tests?
    147 bool pmReadoutGenerateMask(pmReadout *readout)
     147bool pmReadoutGenerateMask(pmReadout *readout, psMaskType satMask, psMaskType badMask)
    148148{
    149149    PS_ASSERT_PTR_NON_NULL(readout, false);
     
    188188    }
    189189
    190     return pmReadoutSetMask(readout);
     190    return pmReadoutSetMask(readout, satMask, badMask);
    191191}
    192192
     
    282282}
    283283
    284 bool pmReadoutGenerateMaskWeight(pmReadout *readout, bool poisson)
     284bool pmReadoutGenerateMaskWeight(pmReadout *readout, psMaskType satMask, psMaskType badMask, bool poisson)
    285285{
    286286    PS_ASSERT_PTR_NON_NULL(readout, false);
     
    288288    bool success = true;                // Was everything successful?
    289289
    290     success &= pmReadoutGenerateMask(readout);
     290    success &= pmReadoutGenerateMask(readout, satMask, badMask);
    291291    success &= pmReadoutGenerateWeight(readout, poisson);
    292292
     
    294294}
    295295
    296 bool pmCellGenerateMaskWeight(pmCell *cell, bool poisson)
     296bool pmCellGenerateMaskWeight(pmCell *cell, psMaskType satMask, psMaskType badMask, bool poisson)
    297297{
    298298    PS_ASSERT_PTR_NON_NULL(cell, false);
     
    302302    for (int i = 0; i < readouts->n; i++) {
    303303        pmReadout *readout = readouts->data[i]; // The readout
    304         pmReadoutGenerateMaskWeight(readout, poisson);
     304        pmReadoutGenerateMaskWeight(readout, poisson, satMask, badMask);
    305305    }
    306306
Note: See TracChangeset for help on using the changeset viewer.