Changeset 20104 for trunk/psLib/src/imageops/psImageInterpolate.c
- Timestamp:
- Oct 13, 2008, 11:47:41 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/imageops/psImageInterpolate.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/imageops/psImageInterpolate.c
r19354 r20104 7 7 * @author Paul Price, IfA 8 8 * 9 * @version $Revision: 1.2 0$ $Name: not supported by cvs2svn $10 * @date $Date: 2008- 09-04 20:11:00$9 * @version $Revision: 1.21 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2008-10-13 21:47:41 $ 11 11 * 12 12 * Copyright 2004-2007 Institute for Astronomy, University of Hawaii … … 682 682 double xSumKernel2 = 0.0; /* Sum of kernel-squared in x */ \ 683 683 float xSumBad = 0.0; /* Sum of bad kernel-squared in x */ \ 684 for (int i = iMin, xPix = xMin; i < iMax; i++, xPix++) { \ 684 /* Dereferenced versions of inputs */ \ 685 const ps##TYPE *imageData = &image->data.TYPE[yPix][xMin]; \ 686 const ps##TYPE *varianceData = &variance->data.TYPE[yPix][xMin]; \ 687 const psMaskType *maskData = &mask->data.PS_TYPE_MASK_DATA[yPix][xMin]; \ 688 for (int i = iMin, xPix = xMin; i < iMax; \ 689 i++, xPix++, imageData++, varianceData++, maskData++) { \ 685 690 float kernelValue = xKernel[i]; /* Value of kernel in x */ \ 686 691 double kernelValue2 = PS_SQR(kernelValue); /* Square of kernel in x */ \ 687 if ( mask->data.PS_TYPE_MASK_DATA[yPix][xPix]& maskVal) { \692 if (*maskData & maskVal) { \ 688 693 xSumBad += kernelValue2; \ 689 694 } else { \ 690 xSumImage += kernelValue * image->data.TYPE[yPix][xPix]; \691 xSumVariance += kernelValue2 * variance->data.TYPE[yPix][xPix]; \695 xSumImage += kernelValue * *imageData; \ 696 xSumVariance += kernelValue2 * *varianceData; \ 692 697 xSumKernel += kernelValue; \ 693 698 } \
Note:
See TracChangeset
for help on using the changeset viewer.
