- Timestamp:
- Sep 28, 2012, 4:56:30 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20120906/pswarp/src/pswarpTransformTile.c
r34471 r34489 46 46 args->jacobian = NAN; 47 47 48 args->background_warping = false; 49 args->offset_x = 0.0; 50 args->offset_y = 0.0; 51 48 52 return args; 49 53 } … … 96 100 97 101 // This needs to use a more reliable method to do this offset and limiting 98 if (args->interp->mode == 8) { 99 double xOffset = 177.0 / 400.0; // (modelsize * modelbinning - xsize) / 2.0 100 double yOffset = 166.0 / 400.0; // (modelsize * modelbinning - ysize) / 2.0 101 xIn += xOffset; 102 yIn += yOffset; 102 // if (args->interp->mode == 8) { 103 if (args->background_warping) { 104 // double xOffset = 177.0 / 400.0; // (modelsize * modelbinning - xsize) / 2.0 105 // double yOffset = 166.0 / 400.0; // (modelsize * modelbinning - ysize) / 2.0 106 xIn += args->offset_x; 107 yIn += args->offset_y; 103 108 104 if ((xIn > inNumCols - xOffset)||105 (yIn > inNumRows - yOffset)||106 (xIn < xOffset)||107 (yIn < yOffset)) {109 if ((xIn > inNumCols - args->offset_x)|| 110 (yIn > inNumRows - args->offset_y)|| 111 (xIn < args->offset_x)|| 112 (yIn < args->offset_y)) { 108 113 continue; 109 114 } 110 } 115 } 111 116 112 117 if (xIn < 0 || xIn >= inNumCols || yIn < 0 || yIn >= inNumRows) {
Note:
See TracChangeset
for help on using the changeset viewer.
