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/src/imageops/psImagePixelExtract.c

    r5530 r6294  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2005-11-16 23:06:14 $
     10 *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2006-02-02 04:41:42 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    216216
    217217psVector* psImageSlice(psVector* out,
    218                        psVector* coords,
     218                       psPixels* coords,
    219219                       const psImage* input,
    220220                       const psImage* mask,
     
    320320        psVector* maskVec = NULL;
    321321        psMaskType* maskData = NULL;
    322         psU32* outPosition = NULL;
     322        psPixelCoord* outPosition = NULL;
    323323
    324324        // recycle output to make a proper sized/type output structure
     
    327327        out = psVectorRecycle(out, numCols, PS_TYPE_F64);
    328328        if (coords != NULL) {
    329             coords = psVectorRecycle(coords, numCols, PS_TYPE_U32);
    330             outPosition = coords->data.U32;
     329            coords = psPixelsRealloc(coords, numCols);
     330            coords->n = numCols;
     331            outPosition = coords->data;
    331332        }
    332333        outData = out->data.F64;
     
    363364                *outData = statVal; \
    364365                if (outPosition != NULL) { \
    365                     *outPosition = c; \
     366                    outPosition->x = c; \
     367                    outPosition->y = row0; \
    366368                    outPosition += delta; \
    367369                } \
     
    401403        psVector* maskVec = NULL;
    402404        psS32 elementSize = PSELEMTYPE_SIZEOF(type);
    403         psU32* outPosition = NULL;
     405        psPixelCoord* outPosition = NULL;
    404406
    405407        // fill in psVector to fake out the statistics functions.
     
    420422        out = psVectorRecycle(out, numRows, PS_TYPE_F64);
    421423        if (coords != NULL) {
    422             coords = psVectorRecycle(coords, numRows, PS_TYPE_U32);
    423             outPosition = coords->data.U32;
     424            coords = psPixelsRealloc(coords, numRows);
     425            coords->n = numRows;
     426            outPosition = coords->data;
    424427        }
    425428        outData = out->data.F64;
     
    442445            *outData = statVal;
    443446            if (outPosition != NULL) {
    444                 *outPosition = r;
     447                outPosition->y = r;
     448                outPosition->x = col0;
    445449                outPosition += delta;
    446450
Note: See TracChangeset for help on using the changeset viewer.