Changeset 12741 for trunk/psLib/src/imageops/psImageConvolve.c
- Timestamp:
- Apr 4, 2007, 12:42:02 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/imageops/psImageConvolve.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/imageops/psImageConvolve.c
r12187 r12741 7 7 /// @author Eugene Magnier, IfA 8 8 /// 9 /// @version $Revision: 1.5 0$ $Name: not supported by cvs2svn $10 /// @date $Date: 2007-0 3-02 22:19:21$9 /// @version $Revision: 1.51 $ $Name: not supported by cvs2svn $ 10 /// @date $Date: 2007-04-04 22:42:02 $ 11 11 /// 12 12 /// Copyright 2004-2007 Institute for Astronomy, University of Hawaii … … 102 102 const psVector *xShifts, 103 103 const psVector *yShifts, 104 bool tRelative,104 float totalTime, 105 105 bool xyRelative) 106 106 { … … 113 113 PS_ASSERT_VECTOR_TYPE(xShifts, PS_TYPE_S32, NULL); 114 114 PS_ASSERT_VECTOR_TYPE(yShifts, PS_TYPE_S32, NULL); 115 116 if (isnan(totalTime)) { 117 // It's more expensive to check for NAN than 0.0 118 totalTime = 0.0; 119 } 115 120 116 121 // If there are no shifts, the kernel is just a 1 at 0,0 … … 153 158 } 154 159 155 if (t Relative) {160 if (totalTime <= 0) { 156 161 tSum += tShifts->data.F32[i]; 157 162 } … … 160 165 psTrace("psLib.imageops", 5, "Kernel range: %d:%d,%d:%d\n", xMin, xMax, yMin, yMax); 161 166 162 if ( !tRelative) {167 if (totalTime > 0) { 163 168 // Then the total time is simply the final value 164 169 // NB: We assume the counter starts at zero! 165 tSum = t Shifts->data.F32[tShifts->n - 1];170 tSum = totalTime; 166 171 } 167 172 … … 181 186 } 182 187 float t = tShifts->data.F32[i]; 183 if ( !tRelative) {188 if (totalTime > 0) { 184 189 t -= tLast; 185 190 tLast = tShifts->data.F32[i];
Note:
See TracChangeset
for help on using the changeset viewer.
