IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 5, 2013, 2:20:46 PM (13 years ago)
Author:
eugene
Message:

stats is basically working now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130419/pswarp/src/pswarpPixelsLit.c

    r23688 r35512  
    6464    for (int y = 0; y < numRows; y++) {
    6565        for (int x = 0; x < numCols; x++) {
    66             if (!(mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] & maskValue)) {
    67                 if (y > yMax) {
    68                     yMax = y;
    69                 }
    70                 if (y < yMin) {
    71                     yMin = y;
    72                 }
    73                 if (x > xMax) {
    74                     xMax = x;
    75                 }
    76                 if (x < xMin) {
    77                     xMin = x;
    78                 }
    79             }
     66            if (mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] & maskValue) { continue; }
     67            xMin = PS_MIN (xMin, x);
     68            xMax = PS_MAX (xMax, x);
     69            yMin = PS_MIN (yMin, y);
     70            yMax = PS_MAX (yMax, y);
    8071        }
    8172    }
    8273
     74    // XXX need to add these in a container appropriate to the element
    8375    if (stats) {
    8476        psMetadataAddS32(stats, PS_LIST_TAIL, "RANGE.XMIN", 0, "Minimum valid x value", xMin);
Note: See TracChangeset for help on using the changeset viewer.