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/imcombine/pmImageCombine.c

    r8815 r9730  
    88 *  @author GLG, MHPCC
    99 *
    10  *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2006-09-15 09:49:01 $
     10 *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2006-10-24 22:55:05 $
    1212 *
    1313 *  XXX: pmRejectPixels() has a known bug with the pmImageTransform() call.
     
    122122    if (*questionablePixels == NULL) {
    123123        *questionablePixels = psArrayAlloc(numImages);
    124         (*questionablePixels)->n = numImages;
    125124    } else if ((*questionablePixels)->n != numImages) {
    126125        *questionablePixels = psArrayRealloc(*questionablePixels, numImages);
     
    137136    psVector *qpPtr = psVectorAlloc(numImages, PS_TYPE_S32);
    138137    psVectorInit(qpPtr, 0);
    139     qpPtr->n = numImages;
    140138    //
    141139    // Allocate the necessary psVectors for the call to psVectorStats().
     
    144142    //
    145143    psVector *pixelData = psVectorAlloc(numImages, PS_TYPE_F32);
    146     pixelData->n = pixelData->nalloc;
    147144    psVector *pixelMask = NULL;
    148145    if (masks != NULL) {
    149146        pixelMask = psVectorAlloc(numImages, PS_TYPE_U8);
    150147        psVectorInit(pixelMask, 0);
    151         pixelMask->n = numImages;
    152148    }
    153149
     
    156152        pixelErrors = psVectorAlloc(numImages, PS_TYPE_F32);
    157153        psVectorInit(pixelErrors, 1.0);
    158         pixelErrors->n = numImages;
    159154    }
    160155
     
    320315    psVector *pixels = psVectorAlloc(8, PS_TYPE_F32); // Array of pixels
    321316    psVector *mask = psVectorAlloc(8, PS_TYPE_U8); // Corresponding mask
    322     pixels->n = 8;
    323     mask->n = 8;
    324317
    325318    // Get limits
     
    538531    //
    539532    psArray *rejects = psArrayAlloc(numImages);
    540     rejects->n = numImages;
    541533    for (psS32 im = 0 ; im < numImages ; im++) {
    542534        rejects->data[im] = (psPtr *) psPixelsAlloc(PS_REJECT_PIXEL_INITIAL_PIXEL_LIST_LENGTH);
     
    550542    psVector *rPtr = psVectorAlloc(numImages, PS_TYPE_S32);
    551543    psVectorInit(rPtr, 0);
    552     rPtr->n = numImages;
    553544
    554545    psS32 numCols = ((psImage *) images->data[0])->numCols;
Note: See TracChangeset for help on using the changeset viewer.