Changeset 6287
- Timestamp:
- Feb 1, 2006, 12:24:05 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_rel9_p0/psModules/src/objects/pmObjects.c
r6183 r6287 6 6 * @author EAM, IfA: significant modifications. 7 7 * 8 * @version $Revision: 1.5.4. 4$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-0 1-22 21:12:19$8 * @version $Revision: 1.5.4.5 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-02-01 22:24:05 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 438 438 XXX: In the output psArray elements, should we use the image row/column offsets? 439 439 Currently, we do not. 440 XXX EAM : this function needs to return peaks in *parent* coords 440 441 441 442 XXX: Merge with CVS 1.20. This had the proper code for images with a single 442 443 row or column. 444 443 445 *****************************************************************************/ 444 446 psArray *pmFindImagePeaks(const psImage *image, … … 458 460 psArray *list = NULL; 459 461 462 psU32 col0 = image->col0; 463 psU32 row0 = image->row0; 464 460 465 // 461 466 // Find peaks in row 0 only. … … 464 469 tmpRow = getRowVectorFromImage((psImage *) image, row); 465 470 psVector *row1 = pmFindVectorPeaks(tmpRow, threshold); 471 // pmFindVectorPeaks returns coords in the vector, not corrected for col0 466 472 467 473 for (psU32 i = 0 ; i < row1->n ; i++ ) { … … 476 482 477 483 if (image->data.F32[row][col] > threshold) { 478 list = myListAddPeak(list, row , col, image->data.F32[row][col], PM_PEAK_EDGE);484 list = myListAddPeak(list, row + row0, col + col0, image->data.F32[row][col], PM_PEAK_EDGE); 479 485 } 480 486 } … … 486 492 (image->data.F32[row][col] >= image->data.F32[row+1][col+1])) { 487 493 if (image->data.F32[row][col] > threshold) { 488 list = myListAddPeak(list, row , col, image->data.F32[row][col], PM_PEAK_EDGE);494 list = myListAddPeak(list, row + row0, col + col0, image->data.F32[row][col], PM_PEAK_EDGE); 489 495 } 490 496 } … … 495 501 (image->data.F32[row][col] >= image->data.F32[row+1][col-1])) { 496 502 if (image->data.F32[row][col] > threshold) { 497 list = myListAddPeak(list, row , col, image->data.F32[row][col], PM_PEAK_EDGE);503 list = myListAddPeak(list, row + row0, col + col0, image->data.F32[row][col], PM_PEAK_EDGE); 498 504 } 499 505 } … … 534 540 (image->data.F32[row][col] >= image->data.F32[row+1][col+1])) { 535 541 myType = PM_PEAK_EDGE; 536 list = myListAddPeak(list, row , col, image->data.F32[row][col], myType);542 list = myListAddPeak(list, row + row0, col + col0, image->data.F32[row][col], myType); 537 543 } 538 544 } else if (col < (image->numCols - 1)) { … … 569 575 } 570 576 571 list = myListAddPeak(list, row , col, image->data.F32[row][col], myType);577 list = myListAddPeak(list, row + row0, col + col0, image->data.F32[row][col], myType); 572 578 } 573 579 } … … 581 587 (image->data.F32[row][col] >= image->data.F32[row+1][col])) { 582 588 myType = PM_PEAK_EDGE; 583 list = myListAddPeak(list, row , col, image->data.F32[row][col], myType);589 list = myListAddPeak(list, row + row0, col + col0, image->data.F32[row][col], myType); 584 590 } 585 591 } else { … … 605 611 (image->data.F32[row][col] > image->data.F32[row][col+1])) { 606 612 if (image->data.F32[row][col] > threshold) { 607 list = myListAddPeak(list, row , col, image->data.F32[row][col], PM_PEAK_EDGE);613 list = myListAddPeak(list, row + row0, col + col0, image->data.F32[row][col], PM_PEAK_EDGE); 608 614 } 609 615 } … … 615 621 (image->data.F32[row][col] >= image->data.F32[row][col+1])) { 616 622 if (image->data.F32[row][col] > threshold) { 617 list = myListAddPeak(list, row , col, image->data.F32[row][col], PM_PEAK_EDGE);623 list = myListAddPeak(list, row + row0, col + col0, image->data.F32[row][col], PM_PEAK_EDGE); 618 624 } 619 625 } … … 624 630 (image->data.F32[row][col] > image->data.F32[row][col-1])) { 625 631 if (image->data.F32[row][col] > threshold) { 626 list = myListAddPeak(list, row , col, image->data.F32[row][col], PM_PEAK_EDGE);632 list = myListAddPeak(list, row + row0, col + col0, image->data.F32[row][col], PM_PEAK_EDGE); 627 633 } 628 634 } … … 730 736 XXX: Sync with IfA on whether the peak x/y coords are data structure coords, 731 737 or they use the image row/column offsets. 738 XXX EAM : peak->x,y uses parent coordinates 732 739 733 740 XXX: Should we simply set pmSource->peak = peak? If so, should we increase … … 1204 1211 1205 1212 // XXX EAM : can we use the value of SATURATE if mask is NULL? 1206 inner = psRegionForSquare (tmpSrc->peak->x - tmpSrc->mask->col0, tmpSrc->peak->y - tmpSrc->mask->row0, 2); 1213 // inner = psRegionForSquare (tmpSrc->peak->x - tmpSrc->mask->col0, tmpSrc->peak->y - tmpSrc->mask->row0, 2); 1214 inner = psRegionForSquare (tmpSrc->peak->x, tmpSrc->peak->y, 2); 1207 1215 int Nsatpix = psImageCountPixelMask (tmpSrc->mask, inner, PSPHOT_MASK_SATURATED); 1208 1216
Note:
See TracChangeset
for help on using the changeset viewer.
