IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 24, 2006, 12:55:05 PM (20 years ago)
Author:
Paul Price
Message:

Following today's meeting, we agreed that psVectorAlloc (and therefore
psArrayAlloc also) shall set the number of elements in use to equal the
number of elements allocated. We introduce new functions,
psVectorAllocEmpty and psArrayAllocEmpty, that allocate a vector and set
the length to zero.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmSourceContour.c

    r8815 r9730  
    66 *  @author EAM, IfA: significant modifications.
    77 *
    8  *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2006-09-15 09:49:01 $
     8 *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2006-10-24 22:55:05 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    240240
    241241    // Allocate data for x/y pairs.
    242     psVector *xVec = psVectorAlloc(100, PS_TYPE_F32);
    243     psVector *yVec = psVectorAlloc(100, PS_TYPE_F32);
     242    psVector *xVec = psVectorAllocEmpty(100, PS_TYPE_F32);
     243    psVector *yVec = psVectorAllocEmpty(100, PS_TYPE_F32);
    244244
    245245    // First row: find the left and right end-points
     
    327327    // fprintf (stderr, "done\n");
    328328    psArray *tmpArray = psArrayAlloc(2);
    329     tmpArray->n = 2;
    330329
    331330    tmpArray->data[0] = (psPtr *) xVec;
     
    338337    pmSourceContour(src, img, level, mode): For an input subImage, and model, this
    339338    routine returns a psArray of coordinates that evaluate to the specified level.
    340     
     339 
    341340    XXX: Probably should remove the "image" argument.
    342341    XXX: What type should the output coordinate vectors consist of?  col,row?
     
    366365    psVector *xVec = psVectorAlloc(2 * source->pixels->numRows, PS_TYPE_F32);
    367366    psVector *yVec = psVectorAlloc(2 * source->pixels->numRows, PS_TYPE_F32);
    368     xVec->n = yVec->n = 2 * source->pixels->numRows;
    369367
    370368    //
     
    447445    //
    448446    psArray *tmpArray = psArrayAlloc(2);
    449     tmpArray->n = 2;
    450447
    451448    tmpArray->data[0] = (psPtr *) yVec;
Note: See TracChangeset for help on using the changeset viewer.