Changeset 15701
- Timestamp:
- Nov 27, 2007, 12:45:55 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/objects/pmModel.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmModel.c
r15700 r15701 6 6 * @author EAM, IfA 7 7 * 8 * @version $Revision: 1. 19$ $Name: not supported by cvs2svn $9 * @date $Date: 2007-11-27 22: 23:16$8 * @version $Revision: 1.20 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2007-11-27 22:45:55 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 231 231 psImage *inRx = model->residuals->Rx; 232 232 psImage *inRy = model->residuals->Ry; 233 xBin = model->residuals->xBin; 234 yBin = model->residuals->yBin; 235 xResidCenter = model->residuals->xCenter; 236 yResidCenter = model->residuals->yCenter; 233 237 if ((image->numCols != inRo->numCols) || 234 238 (image->numRows != inRo->numRows)) { … … 237 241 myRy = psImageAlloc (image->numCols, image->numRows, PS_TYPE_F32); 238 242 // Difference between input and desired centres 239 int xDiff = (int)(inRx->numCols / 2) - (xPos - image->col0); 240 int yDiff = (int)(inRy->numRows / 2) - (yPos - image->row0); 243 int xDiff = (int)(inRo->numCols / 2) - (xPos - image->col0); 244 int yDiff = (int)(inRo->numRows / 2) - (yPos - image->row0); 245 xResidCenter -= xDiff; 246 yResidCenter -= yDiff; 241 247 for (int iy = 0; iy < myRo->numRows; iy++) { 242 248 int jy = iy + yDiff; … … 256 262 myRy->data.F32[iy][ix] = 0.0; 257 263 } else { 258 myRo->data.F32[iy][ix] = inRo->data.F32[jy][jx];259 myRx->data.F32[iy][ix] = inRx->data.F32[jy][jx];260 myRy->data.F32[iy][ix] = inRy->data.F32[jy][jx];264 myRo->data.F32[iy][ix] = 1e10 * inRo->data.F32[jy][jx]; 265 myRx->data.F32[iy][ix] = 1e10 * inRx->data.F32[jy][jx]; 266 myRy->data.F32[iy][ix] = 1e10 * inRy->data.F32[jy][jx]; 261 267 } 262 268 } … … 272 278 Ry = psImageInterpolateOptionsAlloc(PS_INTERPOLATE_BILINEAR, myRy, NULL, NULL, 0, 0.0, 0.0, 1, 0, 0.0); 273 279 274 xBin = model->residuals->xBin;275 yBin = model->residuals->yBin;276 xResidCenter = model->residuals->xCenter;277 yResidCenter = model->residuals->yCenter;278 280 } 279 281
Note:
See TracChangeset
for help on using the changeset viewer.
