IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 1, 2006, 6:41:45 PM (20 years ago)
Author:
desonia
Message:

changed psImagePixelExtract to take a psPixels instead of psVector of coord
parameter.

File:
1 edited

Legend:

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

    r5625 r6294  
    66*  @author Robert DeSonia, MHPCC
    77*
    8 *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    9 *  @date $Date: 2005-11-30 02:00:37 $
     8*  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     9*  @date $Date: 2006-02-02 04:41:45 $
    1010*
    1111*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6464    psVector* out = NULL;
    6565    psImage* image;
    66     psVector* positions = psVectorAlloc( r, PS_TYPE_U32 );
     66    psPixels* positions = psPixelsAlloc( r );
    6767    psImage* mask = psImageAlloc( c, r, PS_TYPE_MASK );
    6868    psStats* stat = psStatsAlloc( PS_STAT_SAMPLE_MEDIAN );
     
    102102    if (out->n != TRUTH_SIZE) { \
    103103        psError(PS_ERR_UNKNOWN,true,"Number of results is wrong (%d, not %d)", \
    104                 out->n,n); \
     104                out->n,TRUTH_SIZE); \
    105105        return TESTNUM*4+1; \
    106106    } \
     
    108108    if (positions->n != TRUTH_SIZE) { \
    109109        psError(PS_ERR_UNKNOWN,true,"Number of results for positions vector is wrong (%d, not %d)", \
    110                 out->n,n); \
     110                positions->n,TRUTH_SIZE); \
    111111        return TESTNUM*4+2; \
    112112    } \
     
    119119        } \
    120120        if (DIRECTION == PS_CUT_X_POS || DIRECTION == PS_CUT_X_NEG) { \
    121             if (positions->data.U32[i] != c/10+TRUTHPIX_X) { \
     121            if (positions->data[i].x != c/10+TRUTHPIX_X) { \
    122122                psError(PS_ERR_UNKNOWN,true,"Improper positions (%d vs %d) result @ %d.", \
    123                         positions->data.U32[i],c/10+TRUTHPIX_X,i); \
     123                        positions->data[i].x,c/10+TRUTHPIX_X,i); \
    124124                return TESTNUM*4+4; \
    125125            } \
    126126        } else { \
    127             if (positions->data.U32[i] != r/10+TRUTHPIX_Y) { \
     127            if (positions->data[i].y != r/10+TRUTHPIX_Y) { \
    128128                psError(PS_ERR_UNKNOWN,true,"Improper positions (%d vs %d) result @ %d.", \
    129                         positions->data.U32[i],r/10+TRUTHPIX_Y,i); \
     129                        positions->data[i].y,r/10+TRUTHPIX_Y,i); \
    130130                return TESTNUM*4+4; \
    131131            } \
Note: See TracChangeset for help on using the changeset viewer.