IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 11, 2005, 12:25:39 PM (21 years ago)
Author:
gusciora
Message:

....

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/pmObjects.c

    r4770 r4992  
    66 *  @author EAM, IfA: significant modifications.
    77 *
    8  *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2005-08-16 01:10:34 $
     8 *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2005-09-11 22:25:39 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    491491
    492492// XXX: Macro this.
    493 static bool isItInThisRegion(const psRegion *valid,
     493static bool isItInThisRegion(const psRegion valid,
    494494                             psS32 x,
    495495                             psS32 y)
    496496{
    497497
    498     if ((x >= valid->x0) &&
    499             (x <= valid->x1) &&
    500             (y >= valid->y0) &&
    501             (y <= valid->y1)) {
     498    if ((x >= valid.x0) &&
     499            (x <= valid.x1) &&
     500            (y >= valid.y0) &&
     501            (y <= valid.y1)) {
    502502        return(true);
    503503    }
     
    519519psList *pmCullPeaks(psList *peaks,
    520520                    psF32 maxValue,
    521                     const psRegion *valid)
     521                    const psRegion valid)
    522522{
    523523    PS_ASSERT_PTR_NON_NULL(peaks, NULL);
     
    531531        pmPeak *tmpPeak = (pmPeak *) tmpListElem->data;
    532532        if ((tmpPeak->counts > maxValue) ||
    533                 ((valid != NULL) &&
    534                  (true == isItInThisRegion(valid, tmpPeak->x, tmpPeak->y)))) {
     533                (true == isItInThisRegion(valid, tmpPeak->x, tmpPeak->y))) {
    535534            psListRemoveData(peaks, (psPtr) tmpPeak);
    536535        }
     
    545544// XXX EAM: I changed this to return a new, subset array
    546545//          rather than alter the existing one
    547 psArray *pmPeaksSubset(psArray *peaks, psF32 maxValue, const psRegion *valid)
     546psArray *pmPeaksSubset(psArray *peaks, psF32 maxValue, const psRegion valid)
    548547{
    549548    PS_ASSERT_PTR_NON_NULL(peaks, NULL);
     
    558557        if (tmpPeak->counts > maxValue)
    559558            continue;
    560         if (valid != NULL) {
    561             if (isItInThisRegion(valid, tmpPeak->x, tmpPeak->y))
    562                 continue;
    563         }
     559        if (isItInThisRegion(valid, tmpPeak->x, tmpPeak->y))
     560            continue;
    564561        psArrayAdd (output, 200, tmpPeak);
    565562    }
Note: See TracChangeset for help on using the changeset viewer.