IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 1, 2007, 6:14:33 PM (19 years ago)
Author:
gusciora
Message:

Added tabular file of all psLib functions in Chapter 6 of the SDRS (Data
Manipulation). Most of the test file changes in this check-in are fairly
cosmetic.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/imageops/tap_psImageStats.c

    r11729 r13123  
    273273    const int CHEBY_Y_DIM = 8;
    274274    const int THRESHOLD = 1;
    275     psImage *imgIn = psImageAlloc( IMAGE_SIZE, IMAGE_SIZE, PS_TYPE_F32 );
    276     psImage *imgOut = psImageAlloc( IMAGE_SIZE, IMAGE_SIZE, PS_TYPE_F32 );
    277     for (int i = 0;i < IMAGE_SIZE;i++ ) {
    278         for (int j = 0;j < IMAGE_SIZE;j++ ) {
     275    psImage *imgIn = psImageAlloc(IMAGE_SIZE, IMAGE_SIZE, PS_TYPE_F32);
     276    psImage *imgOut = psImageAlloc(IMAGE_SIZE, IMAGE_SIZE, PS_TYPE_F32);
     277    for (int i = 0;i < IMAGE_SIZE;i++) {
     278        for (int j = 0;j < IMAGE_SIZE;j++) {
    279279            imgIn->data.F32[ i ][ j ] = 4.0;
    280             imgIn->data.F32[ i ][ j ] = ( float ) ( i + j );
    281             imgIn->data.F32[ i ][ j ] = ( float ) ( i + j ) + ( 4.0 * ( float ) i );
     280            imgIn->data.F32[ i ][ j ] = (float) (i + j);
     281            imgIn->data.F32[ i ][ j ] = (float) (i + j) + (4.0 * (float) i);
    282282            imgOut->data.F32[ i ][ j ] = 0.0;
    283283        }
    284284    }
    285285    psPolynomial2D *my2DPoly = psPolynomial2DAlloc(PS_POLYNOMIAL_CHEB, CHEBY_X_DIM-1, CHEBY_Y_DIM-1);
    286     my2DPoly = psImageFitPolynomial(my2DPoly, imgIn );
     286    my2DPoly = psImageFitPolynomial(my2DPoly, imgIn);
    287287    ok(my2DPoly != NULL, "psImageFitPolynomial() returned non-NULL");
    288288
    289     imgOut = psImageEvalPolynomial( imgOut, my2DPoly );
     289    imgOut = psImageEvalPolynomial(imgOut, my2DPoly);
    290290    bool errorFlag = false;
    291     for (int i = 0;i < IMAGE_SIZE;i++ ) {
    292         for (int j = 0;j < IMAGE_SIZE;j++ ) {
    293             if ( fabs( imgOut->data.F32[ i ][ j ] - imgIn->data.F32[ i ][ j ] ) > THRESHOLD ) {
     291    for (int i = 0;i < IMAGE_SIZE;i++) {
     292        for (int j = 0;j < IMAGE_SIZE;j++) {
     293            if (fabs(imgOut->data.F32[ i ][ j ] - imgIn->data.F32[ i ][ j ]) > THRESHOLD) {
    294294                diag("Pixel (%d, %d) is %.2f, should be %.2f\n", i, j,
    295295                     imgOut->data.F32[ i ][ j ],
     
    357357        ok(hist2 == hist, "psImageHistogram() correctly recycled the input psHistogram");
    358358        bool errorFlag = false;
    359         for (int i = 0;i < numBins;i++ ) {
     359        for (int i = 0;i < numBins;i++) {
    360360            if (hist2->nums->data.F32[i] != (numCols * (numRows/numBins))) {
    361361                diag("ERROR: Bin number %d bounds: (%.1f - %.1f) data (%.2f)\n", i,
     
    434434    }
    435435
    436     // Ensure psImageCountPixelMask returns -1 for NULL input image
     436    // Ensure psImageCountPixelMask returns -1 for wrong input image type
    437437    // Following should generate error
    438438    // XXX: Verify error
     
    486486    // --------------------------------------------------------------
    487487    // psImageStats()
    488     // Ensure psImageStats() returnes NULL for NULL input image
     488    // Ensure psImageStats() returns NULL for NULL input image
    489489    // Following should generate error
    490490    // XXX: Verify error
     
    499499    }
    500500
    501     // Ensure psImageStats() returnes NULL for NULL psStats
     501    // Ensure psImageStats() returns NULL for NULL psStats
    502502    // Following should generate error
    503503    // XXX: Verify error
Note: See TracChangeset for help on using the changeset viewer.