IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 27279 for trunk


Ignore:
Timestamp:
Mar 12, 2010, 5:02:29 PM (16 years ago)
Author:
Paul Price
Message:

Sources no longer affected by 0.5 pixel problem --- can transform directly. This has affected warp source coordinates (and therefore stack quality) for a while.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pswarp/src/pswarpTransformSources.c

    r27096 r27279  
    6060
    6161        int xGrid, yGrid;           ///< Grid coordinates for local map
    62         if (!pswarpMapGridSetGrid(sourceGrid, xIn + 0.5, yIn + 0.5, &xGrid, &yGrid)) {
     62        if (!pswarpMapGridSetGrid(sourceGrid, xIn, yIn, &xGrid, &yGrid)) {
    6363            psError(psErrorCodeLast(), false, "Unable to get grid coordinates for source at %f,%f\n",
    6464                    xIn, yIn);
     
    7575        pswarpMap *map = sourceGrid->maps[xGrid][yGrid]; ///< Locally linear transformation
    7676        double xOut, yOut;          ///< Output coordinates
    77         if (!pswarpMapApply(&xOut, &yOut, map, xIn + 0.5, yIn + 0.5)) {
     77        if (!pswarpMapApply(&xOut, &yOut, map, xIn, yIn)) {
    7878            psError(psErrorCodeLast(), false, "Unable to transform coordinates for source at %f,%f\n",
    7979                    xIn, yIn);
     
    8282            return false;
    8383        }
    84         xOut += output->image->col0 - 0.5;
    85         yOut += output->image->row0 - 0.5;
     84        xOut += output->image->col0;
     85        yOut += output->image->row0;
    8686        if (xOut < minX || xOut > maxX || yOut < minY || yOut > maxY) {
    8787            // It's not in the output image
Note: See TracChangeset for help on using the changeset viewer.