- Timestamp:
- Jul 27, 2008, 12:41:58 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20080719/pswarp/src/pswarpTransformTile.c
r18752 r18753 37 37 // int outNrow = args->output->image->numRows; 38 38 39 // XXX these are wrong (min or max is wrong) 40 int minX = pswarpMapGridNextGrid_Y (args->grid, args->gridY); 41 int minY = pswarpMapGridNextGrid_X (args->grid, args->gridX); 42 int maxX = pswarpMapGridNextGrid_Y (args->grid, args->gridY); 43 int maxY = pswarpMapGridNextGrid_X (args->grid, args->gridX); 39 // get the coordinate range for this grid tile 40 psPlane minPt, maxPt; 41 pswarpMapGridCoordRange (args->grid, args->gridX, args->gridY, &minPt, &maxPt); 44 42 45 psF32 **outImageData = args->output->image->data.F32;46 psF32 **outVarData = args->output->weight->data.F32;47 psMaskType **outMaskData = args->output->mask->data.U8;43 psF32 **outImageData = (args->output->image) ? args->output->image->data.F32 : NULL; 44 psF32 **outVarData = (args->output->weight) ? args->output->weight->data.F32 : NULL; 45 psMaskType **outMaskData = (args->output->mask) ? args->output->mask->data.U8 : NULL; 48 46 49 47 pswarpMap *map = args->grid->maps[args->gridX][args->gridY]; … … 60 58 // Iterate over the output image pixels (parent frame) 61 59 long goodPixels = 0; // Number of input pixels landing on the output image 62 for (int y = min Y; y < maxY; y++) {63 for (int x = min X; x < maxX; x++) {60 for (int y = minPt.y; y < maxPt.y; y++) { 61 for (int x = minPt.x; x < maxPt.x; x++) { 64 62 65 63 // Only transform those pixels requested
Note:
See TracChangeset
for help on using the changeset viewer.
