Changeset 4992 for trunk/psModules/src/pmObjects.c
- Timestamp:
- Sep 11, 2005, 12:25:39 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/pmObjects.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/pmObjects.c
r4770 r4992 6 6 * @author EAM, IfA: significant modifications. 7 7 * 8 * @version $Revision: 1.3 1$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-0 8-16 01:10:34$8 * @version $Revision: 1.32 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-09-11 22:25:39 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 491 491 492 492 // XXX: Macro this. 493 static bool isItInThisRegion(const psRegion *valid,493 static bool isItInThisRegion(const psRegion valid, 494 494 psS32 x, 495 495 psS32 y) 496 496 { 497 497 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)) { 502 502 return(true); 503 503 } … … 519 519 psList *pmCullPeaks(psList *peaks, 520 520 psF32 maxValue, 521 const psRegion *valid)521 const psRegion valid) 522 522 { 523 523 PS_ASSERT_PTR_NON_NULL(peaks, NULL); … … 531 531 pmPeak *tmpPeak = (pmPeak *) tmpListElem->data; 532 532 if ((tmpPeak->counts > maxValue) || 533 ((valid != NULL) && 534 (true == isItInThisRegion(valid, tmpPeak->x, tmpPeak->y)))) { 533 (true == isItInThisRegion(valid, tmpPeak->x, tmpPeak->y))) { 535 534 psListRemoveData(peaks, (psPtr) tmpPeak); 536 535 } … … 545 544 // XXX EAM: I changed this to return a new, subset array 546 545 // rather than alter the existing one 547 psArray *pmPeaksSubset(psArray *peaks, psF32 maxValue, const psRegion *valid)546 psArray *pmPeaksSubset(psArray *peaks, psF32 maxValue, const psRegion valid) 548 547 { 549 548 PS_ASSERT_PTR_NON_NULL(peaks, NULL); … … 558 557 if (tmpPeak->counts > maxValue) 559 558 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; 564 561 psArrayAdd (output, 200, tmpPeak); 565 562 }
Note:
See TracChangeset
for help on using the changeset viewer.
