- Timestamp:
- Sep 25, 2012, 6:08:46 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20120906/pswarp/src/pswarpTransformTile.c
r34470 r34471 83 83 // Iterate over the output image pixels (parent frame) 84 84 long goodPixels = 0; ///< Number of input pixels landing on the output image 85 psTrace("pswarp",3,"Size: %d %d\n",xMax,yMax); 85 86 86 for (int y = yMin; y < yMax; y++) { 87 87 for (int x = xMin; x < xMax; x++) { … … 95 95 pswarpMapApply(&xIn, &yIn, map, x + 0.5, y + 0.5); 96 96 97 // This needs to use a more reliable method to do this offset and limiting 97 98 if (args->interp->mode == 8) { 98 xIn += 177.0 / 400.0; 99 yIn += 166.0 / 400.0; 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; 100 103 101 if ((xIn > inNumCols - 177.0/ 400.0)|| 102 (yIn > inNumRows - 166.0/ 400.0)|| 103 (xIn < 177.0/ 400.0)|| 104 (yIn < 166.0/ 400.0) 105 106 ) { 107 fprintf(stderr,"\n"); 104 if ((xIn > inNumCols - xOffset)|| 105 (yIn > inNumRows - yOffset)|| 106 (xIn < xOffset)|| 107 (yIn < yOffset)) { 108 108 continue; 109 109 } … … 124 124 int xOut = x - outCol0, yOut = y - outRow0; ///< Position on output image 125 125 126 if (((xOut % 500) == 0)&&((yOut % 500) == 0)) {127 fprintf(stderr,"%d %d %g %g %d %d (%d %d %d %d) %g %g %g\n",128 x,y,xIn,yIn,xOut,yOut,xMin,xMax,yMin,yMax,imageValue,129 (4846 - 400 * (12)) / 2.0,130 (4868 - 400 * (12)) / 2.0131 132 );133 }134 135 /* if ((xIn >= args->interp->image->numCols - 1)|| */136 /* (yIn >= args->interp->image->numRows - 1)) { */137 /* imageValue = NAN; */138 /* } */139 126 if (outImageData) { 140 127 outImageData[yOut][xOut] = imageValue * jacobian;
Note:
See TracChangeset
for help on using the changeset viewer.
