IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 27, 2008, 12:41:58 PM (18 years ago)
Author:
eugene
Message:

turn on threading; add -threads argument, split out pswarpTransformSources

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20080719/pswarp/src/pswarpTransformTile.c

    r18752 r18753  
    3737    // int outNrow = args->output->image->numRows;
    3838
    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);
    4442
    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;
    4846
    4947    pswarpMap *map = args->grid->maps[args->gridX][args->gridY];
     
    6058    // Iterate over the output image pixels (parent frame)
    6159    long goodPixels = 0;                // Number of input pixels landing on the output image
    62     for (int y = minY; y < maxY; y++) {
    63         for (int x = minX; x < maxX; x++) {
     60    for (int y = minPt.y; y < maxPt.y; y++) {
     61        for (int x = minPt.x; x < maxPt.x; x++) {
    6462
    6563            // Only transform those pixels requested
Note: See TracChangeset for help on using the changeset viewer.