IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1948


Ignore:
Timestamp:
Oct 4, 2004, 1:39:51 PM (22 years ago)
Author:
evanalst
Message:

Add additional check for invalid mask type.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/image/tst_psImageStats00.c

    r1811 r1948  
    166166    }
    167167
     168
     169    tmpMask = psImageAlloc( IMAGE_X_SIZE, IMAGE_Y_SIZE, PS_TYPE_S8 );
     170    for ( i = 0;i < tmpMask->numRows;i++ ) {
     171        for ( j = 0;j < tmpMask->numCols;j++ ) {
     172            if ( ( i > ( tmpMask->numRows / 2 ) ) &&
     173                    ( j > ( tmpMask->numCols / 2 ) ) ) {
     174                tmpMask->data.S8[ i ][ j ] = 1;
     175            } else {
     176                tmpMask->data.S8[ i ][ j ] = 0;
     177            }
     178        }
     179    }
     180
     181    myHist2 = psImageHistogram(NULL,tmpImage,tmpMask,1);
     182    if (myHist2 != NULL) {
     183        printf("ERROR: myHist2 not equal to NULL\n");
     184    }
     185
     186    psFree( tmpMask );
     187
    168188    psMemCheckCorruption( 1 );
    169189    psFree( myHist );
Note: See TracChangeset for help on using the changeset viewer.