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/psImageMap.c

    r21172 r21183  
    77 *  @author Eugene Magnier, IfA
    88 *
    9  *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2009-01-27 00:00:21 $
     9 *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2009-01-27 06:39:37 $
    1111 *
    1212 *  Copyright 2007 Institute for Astronomy, University of Hawaii
     
    145145    }
    146146
    147     psImage *mask = psImageAlloc (map->map->numCols, map->map->numRows, PS_TYPE_MASK);
     147    psImage *mask = psImageAlloc (map->map->numCols, map->map->numRows, PS_TYPE_IMAGE_MASK);
    148148    psImage *xCoord = psImageAlloc (map->map->numCols, map->map->numRows, PS_TYPE_F32);
    149149    psImage *yCoord = psImageAlloc (map->map->numCols, map->map->numRows, PS_TYPE_F32);
     
    212212            // this will not in general be properly weighted...
    213213            if (psVectorStats (map->stats, fCell, dfCell, NULL, 0)) {
    214                 mask->data.U8[iy][ix] = 0;
     214                mask->data.PS_TYPE_IMAGE_MASK_DATA[iy][ix] = 0;
    215215                // XXX ensure only one option is selected, or save both position and width
    216216                map->map->data.F32[iy][ix] = psStatsGetValue (map->stats, map->stats->options);
     
    224224                yCoord->data.F32[iy][ix] = psStatsGetValue (meanStat, meanStat->options);
    225225            } else {
    226                 mask->data.U8[iy][ix] = 1;
     226                mask->data.PS_TYPE_IMAGE_MASK_DATA[iy][ix] = 1;
    227227            }
    228228
     
    353353}
    354354
    355 psVector *psImageMapEvalVector(const psImageMap *map, const psVector *mask, psMaskType maskValue, const psVector *x, const psVector *y)
     355psVector *psImageMapEvalVector(const psImageMap *map, const psVector *mask, psVectorMaskType 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       if (mask && (mask->data.U8[i] & maskValue)) {
     367      if (mask && (mask->data.PS_TYPE_VECTOR_MASK_DATA[i] & maskValue)) {
    368368        result->data.F32[i] = 0.0;
    369369      } else { 
Note: See TracChangeset for help on using the changeset viewer.