- Timestamp:
- Feb 19, 2009, 7:59:50 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cnb_branch_20090215/psModules/src/objects/pmPeaks.c
r20937 r21536 6 6 * @author EAM, IfA: significant modifications. 7 7 * 8 * @version $Revision: 1.25 $ $Name: not supported by cvs2svn $9 * @date $Date: 200 8-12-08 02:51:14$8 * @version $Revision: 1.25.14.1 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-02-19 17:59:50 $ 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 *****************************************************************************/ … … 63 63 peak->xf = min.x + ix + image->col0; 64 64 peak->yf = min.y + iy + image->row0; 65 peak->dx = NAN; 66 peak->dy = NAN; 67 68 // xf,yf must land on image with 0 pixel border 69 peak->xf = PS_MAX (PS_MIN (peak->xf, image->numCols - 1), image->col0); 70 peak->yf = PS_MAX (PS_MIN (peak->yf, image->numRows - 1), image->row0); 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 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); 71 74 } else { 72 75 peak->xf = ix; 73 76 peak->yf = iy; 74 peak->dx = NAN;75 peak->dy = NAN;77 peak->dx = NAN; 78 peak->dy = NAN; 76 79 } 77 80 … … 86 89 getRowVectorFromImage(): a private function which simply returns a 87 90 psVector containing the specified row of data from the psImage. 88 91 89 92 XXX: Is there a better way to do this? 90 93 XXX EAM: does this really need to alloc a new vector??? … … 245 248 above the given threshold. Returns a vector of type PS_TYPE_U32 containing 246 249 the location (x value) of all peaks. 247 250 248 251 XXX: What types should be supported? Only F32 is implemented. 249 252 250 253 XXX: We currently step through the input vector twice; once to determine the 251 254 size of the output vector, then to set the values of the output vector. … … 253 256 *****************************************************************************/ 254 257 psVector *pmPeaksInVector(const psVector *vector, 255 psF32 threshold)258 psF32 threshold) 256 259 { 257 260 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); … … 347 350 above the given threshold. Returns a psArray containing location (x/y value) 348 351 of all peaks. 349 352 350 353 XXX: I'm not convinced the peak type definition in the SDRS is mutually 351 354 exclusive. Some peaks can have multiple types. Edges for sure. Also, a 352 355 digonal line with the same value at each point will have a peak for every 353 356 point on that line. 354 357 355 358 XXX: This does not work if image has either a single row, or a single column. 356 359 357 360 The peak is returned in the image parent coordinates 358 361
Note:
See TracChangeset
for help on using the changeset viewer.
