Changeset 12744 for trunk/stac/src/stacTransform.c
- Timestamp:
- Apr 4, 2007, 12:54:56 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/stac/src/stacTransform.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/stac/src/stacTransform.c
r9740 r12744 193 193 } 194 194 195 psImageInterpolateOptions *interp = psImageInterpolateOptionsAlloc(PS_INTERPOLATE_BILINEAR, 196 image, error, mask, 1, NAN, NAN, 197 1, 0, 0.0); 198 195 199 // Iterate over the output image pixels 196 200 for (int y = 0; y < outny; y++) { … … 204 208 205 209 // Change PS_INTERPOLATE_BILINEAR to best available technique. 206 outImage->data.F32[y][x] = (psF32)psImagePixelInterpolate(image, detector->x, 207 detector->y, mask, 1, NAN, 208 PS_INTERPOLATE_BILINEAR); 210 double imageValue, varianceValue; 211 if (!psImageInterpolate(&imageValue, &varianceValue, NULL, 212 detector->x, detector->y, interp)) { 213 psError(PS_ERR_UNKNOWN, false, "Unable to interpolate image."); 214 psFree(interp); 215 psFree(detector); 216 psFree(sky); 217 return false; 218 } 219 outImage->data.F32[y][x] = imageValue; 220 209 221 if (error) { 210 222 // Error is actually the variance 211 outError->data.F32[y][x] = (psF32)p_psImageErrorInterpolateBILINEAR_F32(error, 212 detector->x, 213 detector->y, 214 mask, 1, NAN); 223 outError->data.F32[y][x] = varianceValue; 215 224 } 216 225 … … 224 233 } 225 234 } // Iterating over output pixels 235 psFree(interp); 226 236 227 237 } // Iterating over images
Note:
See TracChangeset
for help on using the changeset viewer.
