IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 26, 2009, 2:00:45 PM (17 years ago)
Author:
eugene
Message:

adding mask and maskVal to vector eval functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/imageops/psImageMap.c

    r20767 r21172  
    77 *  @author Eugene Magnier, IfA
    88 *
    9  *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2008-11-17 02:37:28 $
     9 *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2009-01-27 00:00:21 $
    1111 *
    1212 *  Copyright 2007 Institute for Astronomy, University of Hawaii
     
    353353}
    354354
    355 psVector *psImageMapEvalVector(const psImageMap *map, const psVector *x, const psVector *y)
     355psVector *psImageMapEvalVector(const psImageMap *map, const psVector *mask, psMaskType maskValue, const psVector *x, const psVector *y)
    356356{
    357357    PS_ASSERT_IMAGE_MAP_NON_NULL(map, NULL);
     
    365365
    366366    for (int i = 0; i < x->n; i++) {
    367         result->data.F32[i] = psImageUnbinPixel(x->data.F32[i], y->data.F32[i], map->map, map->binning);
     367      if (mask && (mask->data.U8[i] & maskValue)) {
     368        result->data.F32[i] = 0.0;
     369      } else { 
     370        result->data.F32[i] = psImageUnbinPixel(x->data.F32[i], y->data.F32[i], map->map, map->binning);
     371      }
    368372    }
    369373
Note: See TracChangeset for help on using the changeset viewer.