Changeset 30031 for trunk/psModules/src/objects/pmTrend2D.c
- Timestamp:
- Dec 14, 2010, 9:29:23 AM (15 years ago)
- Location:
- trunk/psModules/src/objects
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
pmTrend2D.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects
-
Property svn:mergeinfo
set to
/branches/eam_branches/ipp-20101103/psModules/src/objects merged eligible /branches/eam_branches/ipp-20101205/psModules/src/objects merged eligible
-
Property svn:mergeinfo
set to
-
trunk/psModules/src/objects/pmTrend2D.c
r25754 r30031 179 179 } 180 180 181 bool pmTrend2DFit( pmTrend2D *trend, psVector *mask, psVectorMaskType maskVal, const psVector *x,181 bool pmTrend2DFit(bool *goodFit, pmTrend2D *trend, psVector *mask, psVectorMaskType maskVal, const psVector *x, 182 182 const psVector *y, const psVector *f, const psVector *df) 183 183 { … … 188 188 PS_ASSERT_VECTOR_NON_NULL(f, false); 189 189 190 bool status; 190 bool status = false; 191 *goodFit = false; 192 // for the psImageMap fit, it is possible to have valid data but no valid solution for 193 // example, an isolated cell may not be reached from other cells, making the solution 194 // degenerate. psImageMapFit should probably handle this case, but until it does, we allow 195 // it to fail on the result, but not yield an error (goodFit = false). 196 // psVectorClipFitPolynomial2D can not fail in this way (really?), so goodFit is always 197 // true 198 191 199 switch (trend->mode) { 192 200 case PM_TREND_POLY_ORD: … … 196 204 // of points in the image, and potentially based on the fractional range of the 197 205 // data? 206 *goodFit = true; 198 207 break; 199 208 … … 201 210 // XXX supply fraction from trend elements 202 211 // XXX need to add the API which adjusts the scale 203 status = psImageMapClipFit( trend->map, trend->stats, mask, maskVal, x, y, f, df);212 status = psImageMapClipFit(goodFit, trend->map, trend->stats, mask, maskVal, x, y, f, df); 204 213 break; 205 214
Note:
See TracChangeset
for help on using the changeset viewer.
