IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 31, 2008, 10:31:29 AM (18 years ago)
Author:
eugene
Message:

conversion of psMaskType to psImageMaskType or psVectorMaskType as needed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20081230/psModules/src/imcombine/pmReadoutCombine.c

    r19086 r21075  
    105105
    106106    // note the mask value actually used
    107     psMaskType maskVal = params->maskVal; // The mask value
     107    psImageMaskType maskVal = params->maskVal; // The mask value
    108108    if (maskVal) {
    109109        psString comment = NULL;        // Comment to add to header
     
    247247    psF32 *pixelsData = pixels->data.F32; // Dereference pixels
    248248
    249     psVector *mask   = psVectorAlloc(inputs->n, PS_TYPE_U8); // Mask for stack
    250     psU8 *maskData = mask->data.U8;     // Dereference mask
     249    psVector *mask   = psVectorAlloc(inputs->n, PS_TYPE_VECTOR_MASK); // Mask for stack
     250    psVectorMaskType *maskData = mask->data.PS_TYPE_VECTOR_MASK_DATA;     // Dereference mask
    251251
    252252    psVector *weights = NULL;           // Stack of weights
     
    260260
    261261    float keepFrac = 1.0 - params->fracLow - params->fracHigh; // Fraction of pixels to keep
    262     psMaskType maskVal = params->maskVal; // The mask value
     262    psImageMaskType maskVal = params->maskVal; // The mask value
    263263
    264264    #ifndef PS_NO_TRACE
     
    278278    // Dereference output products
    279279    psF32 **outputImage  = output->image->data.F32; // Output image
    280     psU8  **outputMask   = output->mask->data.U8; // Output mask
     280    psImageMaskType **outputMask   = output->mask->data.PS_TYPE_IMAGE_MASK_DATA; // Output mask
    281281    psF32 **outputWeight = NULL; // Output weight map
    282282    if (output->weight) {
     
    303303
    304304            int numValid = 0;           // Number of valid pixels in the stack
    305             memset(maskData, 0, mask->n * sizeof(psU8)); // Reset the mask
     305            memset(maskData, 0, mask->n * sizeof(psImageMaskType)); // Reset the mask
    306306            for (int r = 0; r < inputs->n; r++) {
    307307                pmReadout *readout = inputs->data[r]; // Input readout
     
    318318                // Check mask
    319319                psImage *roMask = readout->mask; // The mask image
    320                 if (roMask && roMask->data.U8[yIn][xIn] & maskVal) {
     320                if (roMask && roMask->data.PS_TYPE_IMAGE_MASK_DATA[yIn][xIn] & maskVal) {
    321321                    maskData[r] = 1;
    322322                    continue;
Note: See TracChangeset for help on using the changeset viewer.