IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 11, 2012, 2:04:31 PM (13 years ago)
Author:
watersc1
Message:

Merge from my branch including background restoration and stack stage projection cell binned images.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/pswarp/src/pswarpTransformTile.c

    r29331 r34800  
    4646    args->jacobian = NAN;
    4747
     48    args->background_warping = false;
     49    args->offset_x = 0.0;
     50    args->offset_y = 0.0;
     51   
    4852    return args;
    4953}
     
    8387    // Iterate over the output image pixels (parent frame)
    8488    long goodPixels = 0;                ///< Number of input pixels landing on the output image
     89
    8590    for (int y = yMin; y < yMax; y++) {
    8691        for (int x = xMin; x < xMax; x++) {
    87 
    8892            // Only transform those pixels requested
    8993            if (region && region->data.PS_TYPE_IMAGE_MASK_DATA[y][x]) {
    9094                continue;
    9195            }
    92 
    9396            // pswarpMapApply converts the output coordinate (x,y) to the input coordinate.
    9497            // both are in the parent frames of the input and output images.
    9598            double xIn, yIn;            // Input pixel coordinates
    9699            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           
    97117            if (xIn < 0 || xIn >= inNumCols || yIn < 0 || yIn >= inNumRows) {
    98118                continue;
Note: See TracChangeset for help on using the changeset viewer.