Changeset 34800 for trunk/pswarp/src/pswarpTransformTile.c
- Timestamp:
- Dec 11, 2012, 2:04:31 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
pswarp/src/pswarpTransformTile.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
trunk/pswarp/src/pswarpTransformTile.c
r29331 r34800 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 } … … 83 87 // Iterate over the output image pixels (parent frame) 84 88 long goodPixels = 0; ///< Number of input pixels landing on the output image 89 85 90 for (int y = yMin; y < yMax; y++) { 86 91 for (int x = xMin; x < xMax; x++) { 87 88 92 // Only transform those pixels requested 89 93 if (region && region->data.PS_TYPE_IMAGE_MASK_DATA[y][x]) { 90 94 continue; 91 95 } 92 93 96 // pswarpMapApply converts the output coordinate (x,y) to the input coordinate. 94 97 // both are in the parent frames of the input and output images. 95 98 double xIn, yIn; // Input pixel coordinates 96 99 pswarpMapApply(&xIn, &yIn, map, x + 0.5, y + 0.5); 100 101 // This needs to use a more reliable method to do this offset and limiting 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; 108 109 if ((xIn > inNumCols - args->offset_x)|| 110 (yIn > inNumRows - args->offset_y)|| 111 (xIn < args->offset_x)|| 112 (yIn < args->offset_y)) { 113 continue; 114 } 115 } 116 97 117 if (xIn < 0 || xIn >= inNumCols || yIn < 0 || yIn >= inNumRows) { 98 118 continue;
Note:
See TracChangeset
for help on using the changeset viewer.
