IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 6, 2004, 11:50:14 AM (22 years ago)
Author:
desonia
Message:

modified runTest / FullUnitTest to suppress line numbers in messages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/image/psImageExtraction.c

    r1385 r1404  
    99*  @author Robert DeSonia, MHPCC
    1010*
    11 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2004-08-04 23:37:39 $
     11*  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2004-08-06 21:50:13 $
    1313*
    1414*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    230230
    231231psVector* psImageSlice( psVector* out,
     232                        psVector* slicePositions,
    232233                        const psImage* restrict in,
    233234                        const psImage* restrict mask,
     
    321322        psVector* maskVec = NULL;
    322323        psMaskType* maskData = NULL;
     324        psU32* outPosition = NULL;
    323325
    324326        // recycle output to make a proper sized/type output structure
    325327        // n.b. type is double as that is the type given for all stats in psStats.
    326         out = psVectorRecycle( out, PS_TYPE_F64, numCols );
     328        out = psVectorRecycle( out, numCols, PS_TYPE_F64);
     329        if (slicePositions != NULL) {
     330            slicePositions = psVectorRecycle(slicePositions,numCols,PS_TYPE_U32);
     331            outPosition = slicePositions->data.U32;
     332        }
    327333        outData = out->data.F64;
    328334        if ( delta < 0 ) {
     
    355361                (void)p_psGetStatValue(myStats,&statVal); \
    356362                *outData = statVal; \
     363                if (outPosition != NULL) { \
     364                    *(outPosition++) = col+c; \
     365                } \
    357366                outData += delta; \
    358367            } \
     
    385394            psVector* maskVec = NULL;
    386395            int elementSize = PSELEMTYPE_SIZEOF( type );
     396            psU32* outPosition = NULL;
    387397
    388398            // fill in psVectors to fake out the statistics functions.
     
    398408            // recycle output to make a proper sized/type output structure
    399409            // n.b. type is double as that is the type given for all stats in psStats.
    400             out = psVectorRecycle( out, PS_TYPE_F64, numRows );
     410            out = psVectorRecycle( out, numRows, PS_TYPE_F64 );
     411            if (slicePositions != NULL) {
     412                slicePositions = psVectorRecycle(slicePositions,numRows,PS_TYPE_U32);
     413                outPosition = slicePositions->data.U32;
     414            }
    401415            outData = out->data.F64;
    402416            if ( delta < 0 ) {
     
    413427                ( void ) p_psGetStatValue( myStats, &statVal ); // we know it works cause we tested it above
    414428                *outData = statVal;
     429                if (outPosition != NULL) {
     430                    *(outPosition++) = row+r;
     431                }
    415432                outData += delta;
    416433            }
Note: See TracChangeset for help on using the changeset viewer.