Changeset 6493 for branches/rel10_ifa/psModules/src/objects/pmObjects.c
- Timestamp:
- Feb 24, 2006, 6:23:34 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/rel10_ifa/psModules/src/objects/pmObjects.c
r6480 r6493 6 6 * @author EAM, IfA: significant modifications. 7 7 * 8 * @version $Revision: 1.9.4. 2$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-02-2 4 04:03:45$8 * @version $Revision: 1.9.4.3 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-02-25 04:23:34 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 909 909 // XXX EAM : mask == 0 is valid 910 910 911 psF32 **vPix = source->pixels->data.F32;912 psF32 **vWgt = source->weight->data.F32;913 psU8 **vMsk = source->mask->data.U8;914 915 911 for (psS32 row = 0; row < source->pixels->numRows ; row++) { 916 for (psS32 col = 0; col < source->pixels->numCols ; col++) { 917 if ((source->mask != NULL) && (vMsk[row][col])) { 912 913 psF32 *vPix = source->pixels->data.F32[row]; 914 psF32 *vWgt = source->weight->data.F32[row]; 915 psU8 *vMsk = (source->mask == NULL) ? NULL : source->mask->data.U8[row]; 916 917 for (psS32 col = 0; col < source->pixels->numCols ; col++, vPix++, vWgt++) { 918 if ((vMsk != NULL) && *vMsk) { 919 vMsk++; 918 920 continue; 919 921 } 920 921 // psF32 xDiff = col + source->pixels->col0 - xPeak;922 // psF32 yDiff = row + source->pixels->row0 - yPeak;923 922 924 923 psF32 xDiff = col + xOff; 925 924 psF32 yDiff = row + yOff; 926 925 927 // XXX EAM : calculate xDiff, yDiff up front; 928 // radius is just a function of (xDiff, yDiff) 926 // radius is just a function of (xDiff, yDiff) 929 927 if (!VALID_RADIUS(xDiff, yDiff, R2)) { 928 if (vMsk != NULL) 929 vMsk++; 930 930 continue; 931 931 } 932 932 933 psF32 pDiff = vPix[row][col]- sky;934 psF32 wDiff = vWgt[row][col];933 psF32 pDiff = *vPix - sky; 934 psF32 wDiff = *vWgt; 935 935 936 936 // XXX EAM : check for valid S/N in pixel 937 937 // XXX EAM : should this limit be user-defined? 938 938 if (PS_SQR(pDiff) < wDiff) { 939 if (vMsk != NULL) 940 vMsk++; 939 941 continue; 940 942 } … … 948 950 X1 += xWght; 949 951 Y1 += yWght; 952 950 953 XY += xDiff * yWght; 951 952 954 X2 += xDiff * xWght; 953 955 Y2 += yDiff * yWght; 954 956 955 peakPixel = PS_MAX ( vPix[row][col], peakPixel);957 peakPixel = PS_MAX (*vPix, peakPixel); 956 958 numPixels++; 959 if (vMsk != NULL) 960 vMsk++; 957 961 } 958 962 }
Note:
See TracChangeset
for help on using the changeset viewer.
