- Timestamp:
- Mar 5, 2009, 11:13:29 AM (17 years ago)
- Location:
- branches/cnb_branches/cnb_branch_20090215
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
psModules/src/objects/pmPeaks.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/cnb_branches/cnb_branch_20090215
-
branches/cnb_branches/cnb_branch_20090215/psModules/src/objects/pmPeaks.c
r21536 r23197 6 6 * @author EAM, IfA: significant modifications. 7 7 * 8 * @version $Revision: 1.2 5.14.1$ $Name: not supported by cvs2svn $9 * @date $Date: 2009-02-1 9 17:59:50$8 * @version $Revision: 1.26 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-02-16 22:30:14 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 28 28 AddPeak(): A private function which allocates a psArray, if the peaks 29 29 argument is NULL, otherwise it adds the peak to that array. 30 XXX EAM : row,col now refer to image coords, NOT parent (since this is private) 30 XXX EAM : row,col now refer to image coords, NOT parent (since this is private) 31 31 XXX EAM : now also calculates fractional peak positions from 3x3 bicube region 32 32 *****************************************************************************/ … … 64 64 peak->yf = min.y + iy + image->row0; 65 65 66 // These errors are fractional errors, and should be scaled by the 67 // error on the peak pixel (see, eg, psphotFindPeaks)68 peak->dx = min.xErr;69 peak->dy = min.yErr;70 71 // xf,yf must land on image with 0 pixel border72 peak->xf = PS_MAX (PS_MIN (peak->xf, image->numCols - 1), image->col0);73 peak->yf = PS_MAX (PS_MIN (peak->yf, image->numRows - 1), image->row0);66 // These errors are fractional errors, and should be scaled by the 67 // error on the peak pixel (see, eg, psphotFindPeaks) 68 peak->dx = min.xErr; 69 peak->dy = min.yErr; 70 71 // xf,yf must land on image with 0 pixel border 72 peak->xf = PS_MAX (PS_MIN (peak->xf, image->numCols - 1), image->col0); 73 peak->yf = PS_MAX (PS_MIN (peak->yf, image->numRows - 1), image->row0); 74 74 } else { 75 75 peak->xf = ix; 76 76 peak->yf = iy; 77 peak->dx = NAN;78 peak->dy = NAN;77 peak->dx = NAN; 78 peak->dy = NAN; 79 79 } 80 80 … … 89 89 getRowVectorFromImage(): a private function which simply returns a 90 90 psVector containing the specified row of data from the psImage. 91 91 92 92 XXX: Is there a better way to do this? 93 93 XXX EAM: does this really need to alloc a new vector??? … … 248 248 above the given threshold. Returns a vector of type PS_TYPE_U32 containing 249 249 the location (x value) of all peaks. 250 250 251 251 XXX: What types should be supported? Only F32 is implemented. 252 252 253 253 XXX: We currently step through the input vector twice; once to determine the 254 254 size of the output vector, then to set the values of the output vector. … … 256 256 *****************************************************************************/ 257 257 psVector *pmPeaksInVector(const psVector *vector, 258 psF32 threshold)258 psF32 threshold) 259 259 { 260 260 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); … … 350 350 above the given threshold. Returns a psArray containing location (x/y value) 351 351 of all peaks. 352 352 353 353 XXX: I'm not convinced the peak type definition in the SDRS is mutually 354 354 exclusive. Some peaks can have multiple types. Edges for sure. Also, a 355 355 digonal line with the same value at each point will have a peak for every 356 356 point on that line. 357 357 358 358 XXX: This does not work if image has either a single row, or a single column. 359 359 360 360 The peak is returned in the image parent coordinates 361 361
Note:
See TracChangeset
for help on using the changeset viewer.
