IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 26, 2009, 8:40:07 PM (17 years ago)
Author:
eugene
Message:

incorporating changes from 16bit mask upgrades (eam_branch_20081230)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/detrend/pmSkySubtract.c

    r12742 r21183  
    66 *  @author GLG, MHPCC
    77 *
    8  *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2007-04-04 22:42:48 $
     8 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-01-27 06:39:38 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    114114
    115115    psVector *binVector = psVectorAlloc(binFactor * binFactor, PS_TYPE_F32);
    116     psVector *binMask = psVectorAlloc(binFactor * binFactor, PS_TYPE_U8);
     116    psVector *binMask = psVectorAlloc(binFactor * binFactor, PS_TYPE_VECTOR_MASK);
    117117    psStats *myStats = psStatsAlloc(statOptions);
    118118
     
    126126                        binVector->data.F32[count] =
    127127                            origImage->data.F32[row + binRow][col + binCol];
    128                         binMask->data.U8[count] = 0;
     128                        binMask->data.PS_TYPE_VECTOR_MASK_DATA[count] = 0;
    129129                    } else {
    130130                        binVector->data.F32[count] = 0.0;
    131                         binMask->data.U8[count] = 1;
     131                        binMask->data.PS_TYPE_VECTOR_MASK_DATA[count] = 1;
    132132                    }
    133133                    count++;
     
    313313    PS_ASSERT_IMAGE_NON_NULL(maskImage, NULL);
    314314    PS_ASSERT_IMAGE_NON_EMPTY(maskImage, NULL);
    315     PS_ASSERT_IMAGE_TYPE(maskImage, PS_TYPE_U8, NULL);
     315    PS_ASSERT_IMAGE_TYPE(maskImage, PS_TYPE_IMAGE_MASK, NULL);
    316316    PS_ASSERT_IMAGES_SIZE_EQUAL(dataImage, maskImage, NULL);
    317317    psS32 oldPolyX = -1;
     
    361361    for (x=0;x<dataImage->numRows;x++) {
    362362        for (y=0;y<dataImage->numCols;y++) {
    363             if (maskImage->data.U8[x][y] == 0) {
     363            if (maskImage->data.PS_TYPE_IMAGE_MASK_DATA[x][y] == 0) {
    364364                buildSums((psF64) x, (psF64) y, myPoly->nX, myPoly->nY);
    365365
     
    572572
    573573        if (in->mask != NULL) {
    574             binnedMaskImage = psImageCopy(binnedMaskImage, in->mask, PS_TYPE_U8);
     574            binnedMaskImage = psImageCopy(binnedMaskImage, in->mask, PS_TYPE_IMAGE_MASK);
    575575            if (binnedMaskImage == NULL) {
    576576                psError(PS_ERR_UNKNOWN, false, "psImageCopy() returned NULL.  Returning in image.\n");
     
    581581            binnedMaskImage = psImageAlloc(binnedImage->numCols,
    582582                                           binnedImage->numRows,
    583                                            PS_TYPE_U8);
     583                                           PS_TYPE_IMAGE_MASK);
    584584            psImageInit(binnedMaskImage, 0);
    585585        }
     
    592592        binnedMaskImage = psImageAlloc(binnedImage->numCols,
    593593                                       binnedImage->numRows,
    594                                        PS_TYPE_U8);
     594                                       PS_TYPE_IMAGE_MASK);
    595595        psImageInit(binnedMaskImage, 0);
    596596    }
     
    625625                if (fabs(binnedImage->data.F32[row][col] - binnedMean) >
    626626                        (clipSD * binnedStdev)) {
    627                     binnedMaskImage->data.U8[row][col] = 1;
     627                    binnedMaskImage->data.PS_TYPE_IMAGE_MASK_DATA[row][col] = 1;
    628628                }
    629629            }
Note: See TracChangeset for help on using the changeset viewer.