IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 16, 2014, 2:58:43 PM (12 years ago)
Author:
eugene
Message:

add some commented-out asserts on subsample pixel range

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140610/psLib/src/imageops/psImageBackground.c

    r31152 r37022  
    124124        }
    125125    } else if (nSubset >= nGoodPixels) {
    126             psTrace ("psLib.imageops", 4, "case 2: nSubset >= nGoodPixels (%d x %d : %d : %d : %d)\n", (int) nx, (int) ny, (int) nSubset, (int) nGoodPixels, (int) nPixels);
     126        psTrace ("psLib.imageops", 4, "case 2: nSubset >= nGoodPixels (%d x %d : %d : %d : %d)\n", (int) nx, (int) ny, (int) nSubset, (int) nGoodPixels, (int) nPixels);
    127127        // in this case, we have to select from all masked pixels just to get the desired
    128128        // sample size
     
    157157            double frnd = psRandomUniform(rng);
    158158            int pixel = pixelVector->n * frnd;
    159                
     159            // psAssert (pixel < pixelVector->nalloc, "oops, we went too far (1)");
     160            // psAssert (pixel >= 0, "oops, we went too far (2)");
     161            // psAssert (pixelVector->n - 1 < pixelVector->nalloc, "oops, we went too far (3)");
     162            // psAssert (pixelVector->n - 1 >= 0, "oops, we went too far (4)");
     163
    160164            psVectorAppend(values, pixelVector->data.F32[pixel]);
    161165            pixelVector->data.F32[pixel] = pixelVector->data.F32[pixelVector->n - 1];
Note: See TracChangeset for help on using the changeset viewer.