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/psLib/src/imageops/psImagePixelInterpolate.c

    r15254 r21183  
    1111 *  @author Eugene Magnier, IfA
    1212 *
    13  *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2007-10-09 19:25:44 $
     13 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2009-01-27 06:39:37 $
    1515 *
    1616 *  Copyright 2007 Institute for Astronomy, University of Hawaii
     
    5454                    /* do not test self */ \
    5555                    if (!jx && !jy) { continue; } \
    56                     if (mask->data.PS_TYPE_MASK_DATA[iy+jy][ix+jx] & maskVal) { continue; } \
     56                    if (mask->data.PS_TYPE_IMAGE_MASK_DATA[iy+jy][ix+jx] & maskVal) { continue; } \
    5757                    nGood ++; \
    5858                } \
     
    6767// just the mask, the output image contains enum values which define the type of interpolation which
    6868// can be performed
    69 psImage *psImagePixelInterpolateState (int *nBad, int *nPoor, psImage *mask, psMaskType maskVal) {
     69psImage *psImagePixelInterpolateState (int *nBad, int *nPoor, psImage *mask, psImageMaskType maskVal) {
    7070
    7171    psImage *result = psImageAlloc (mask->numCols, mask->numRows, PS_TYPE_S32);
     
    7979
    8080            // state of the good pixels (unmasked)
    81             if (!(mask->data.PS_TYPE_MASK_DATA[iy][ix] & maskVal)) {
     81            if (!(mask->data.PS_TYPE_IMAGE_MASK_DATA[iy][ix] & maskVal)) {
    8282                // count good neighbor pixels (+ self)
    8383                int nGood = 0;
     
    9494                        if (jx + ix < 0) { continue; }
    9595                        if (jx + ix >= mask->numCols) { continue; }
    96                         if (mask->data.PS_TYPE_MASK_DATA[iy+jy][ix+jx] & maskVal) { continue; }
     96                        if (mask->data.PS_TYPE_IMAGE_MASK_DATA[iy+jy][ix+jx] & maskVal) { continue; }
    9797                        nGood ++;
    9898                        minX = PS_MIN (minX, jx);
     
    137137
    138138// interpolate the poor pixels using the available options
    139 bool psImagePixelInterpolatePoor (psImage *image, psImage *state, psImage *mask, psMaskType maskVal) {
     139bool psImagePixelInterpolatePoor (psImage *image, psImage *state, psImage *mask, psImageMaskType maskVal) {
    140140
    141141    assert (image->numCols == state->numCols);
     
    185185                          if (!jx && !jy) { continue; }
    186186                          // skip masked pixels
    187                           if (mask->data.PS_TYPE_MASK_DATA[iy+jy][ix+jx] & maskVal) { continue; }
     187                          if (mask->data.PS_TYPE_IMAGE_MASK_DATA[iy+jy][ix+jx] & maskVal) { continue; }
    188188                          x->data.F32[n] = jx;
    189189                          y->data.F32[n] = jy;
     
    241241   
    242242// interpolate the good pixels to their true centers
    243 bool psImagePixelInterpolateCenter (psImage *value, psImage *xCoord, psImage *yCoord, psImage *state, psImage *mask, psMaskType maskVal) {
     243bool psImagePixelInterpolateCenter (psImage *value, psImage *xCoord, psImage *yCoord, psImage *state, psImage *mask, psImageMaskType maskVal) {
    244244
    245245    assert (value->numCols == state->numCols);
     
    299299                          if (jx + ix >= value->numCols) { continue; }
    300300                          // skip masked pixels
    301                           if (mask->data.PS_TYPE_MASK_DATA[iy+jy][ix+jx] & maskVal) { continue; }
     301                          if (mask->data.PS_TYPE_IMAGE_MASK_DATA[iy+jy][ix+jx] & maskVal) { continue; }
    302302                          x->data.F32[n] = xCoord->data.F32[iy+jy][ix+jx];
    303303                          y->data.F32[n] = yCoord->data.F32[iy+jy][ix+jx];
     
    331331                          if (jx + ix >= value->numCols) { continue; }
    332332                          // skip masked pixels
    333                           if (mask->data.PS_TYPE_MASK_DATA[iy+jy][ix+jx] & maskVal) { continue; }
     333                          if (mask->data.PS_TYPE_IMAGE_MASK_DATA[iy+jy][ix+jx] & maskVal) { continue; }
    334334                          x->data.F32[n] = xCoord->data.F32[iy+jy][ix+jx];
    335335                          y->data.F32[n] = yCoord->data.F32[iy+jy][ix+jx];
     
    363363    for (int iy = 0; iy < value->numRows; iy++) {
    364364        for (int ix = 0; ix < value->numCols; ix++) {
    365           if (mask->data.PS_TYPE_MASK_DATA[iy][ix] & maskVal) { continue; }
     365          if (mask->data.PS_TYPE_IMAGE_MASK_DATA[iy][ix] & maskVal) { continue; }
    366366          value->data.F32[iy][ix] = output->data.F32[iy][ix];
    367367        }
Note: See TracChangeset for help on using the changeset viewer.