IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31878


Ignore:
Timestamp:
Jul 14, 2011, 10:39:20 AM (15 years ago)
Author:
eugene
Message:

fixed endpost error in warp super pixels (always make an extra superpixel)

Location:
trunk/pswarp/src
Files:
2 edited

Legend:

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

    r23487 r31878  
    3232    int Ny = src->image->numRows + src->image->row0;
    3333
    34     // allocate an extra superpixel to carry the remainder
    35     int nXpts = Nx / nXpix;
    36     int nYpts = Ny / nYpix;
    37     if (Nx % nXpix) nXpts ++;
    38     if (Ny % nYpix) nYpts ++;
     34    // always allocate an extra superpixel to handle spillover
     35    int nXpts = (int)(Nx / nXpix) + 1;
     36    int nYpts = (int)(Ny / nYpix) + 1;
    3937
    4038    // create the grid of maps
  • trunk/pswarp/src/pswarpTransformReadout.c

    r28548 r31878  
    110110    // Ensure threading is off for the covariance calculation, since we are threading on a different level.
    111111    psImageCovarianceSetThreads(false);
     112
     113    psAssert (xGridMin >= 0, "xGridMin too small\n");
     114    psAssert (yGridMin >= 0, "yGridMin too small\n");
     115    psAssert (xGridMax < grid->nXpts, "xGridMax too big\n");
     116    psAssert (yGridMax < grid->nYpts, "yGridMax too big\n");
    112117
    113118    // create jobs and supply them to the threads
Note: See TracChangeset for help on using the changeset viewer.