IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 3, 2006, 3:01:34 PM (20 years ago)
Author:
drobbin
Message:

Updated files to reflect psArray, psVector, & psPixels changes in psLib that set n=0 upon allocation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/imsubtract/pmSubtractBias.c

    r6506 r6511  
    66 *  @author GLG, MHPCC
    77 *
    8  *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2006-03-02 23:16:05 $
     8 *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2006-03-04 01:01:33 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    307307    // XXX: use psVectorCopy if they get it working.
    308308    out->knots = psVectorAlloc(in->knots->n, in->knots->type.type);
     309    out->knots->n = out->knots->nalloc;
    309310    for (psS32 i = 0 ; i < in->knots->n ; i++) {
    310311        out->knots->data.F32[i] = in->knots->data.F32[i];
     
    346347    // Allocate the new vector.
    347348    psVector *newVec = psVectorAlloc(n, PS_TYPE_F32);
    348 
     349    newVec->n = newVec->nalloc;
    349350    //
    350351    // If the new vector is the same size as the old, simply copy the data.
     
    491492    psS32 numOverscanImages = my_psListLength(bias);
    492493    psVector *statsAll = psVectorAlloc(numOverscanImages, PS_TYPE_F32);
     494    statsAll->n = statsAll->nalloc;
    493495    psListElem *tmpOverscan = (psListElem *) bias->head;
    494496    psS32 i = 0;
     
    554556    psVector *tmpRow = psVectorAlloc(overscanImage->numCols, PS_TYPE_F32);
    555557    psVector *tmpCol = psVectorAlloc(overscanImage->numRows, PS_TYPE_F32);
     558    tmpRow->n = tmpRow->nalloc;
     559    tmpCol->n = tmpCol->nalloc;
    556560
    557561    //
     
    594598    psVector *tmpRow = psVectorAlloc(overscanImage->numCols, PS_TYPE_F32);
    595599    psVector *tmpCol = psVectorAlloc(overscanImage->numRows, PS_TYPE_F32);
     600    tmpRow->n = tmpRow->nalloc;
     601    tmpCol->n = tmpCol->nalloc;
    596602
    597603    //
     
    649655    psS32 vecSize = GetOverscanSize(inImg, overScanAxis);
    650656    psVector *overscanVector = psVectorAlloc(vecSize, PS_TYPE_F32);
     657    overscanVector->n = overscanVector->nalloc;
    651658
    652659    //
     
    658665    psS32 numOverscanImages = my_psListLength(bias);
    659666    psVector **overscanVectors = (psVector **) psAlloc(numOverscanImages * sizeof(psVector *));
     667    //    (*overscanVectors)->n = (*overscanVectors)->nalloc;
    660668    for (psS32 i = 0 ; i < numOverscanImages ; i++) {
    661669        overscanVectors[i] = NULL;
     
    711719    //
    712720    psVector *tmpVec = psVectorAlloc(numOverscanImages, PS_TYPE_F32);
     721    tmpVec->n = tmpVec->nalloc;
    713722    psF64 statValue;
    714723    for (psS32 i = 0 ; i < vecSize ; i++) {
     
    772781        psVector *myBin = psVectorAlloc(numBins, PS_TYPE_F32);
    773782        psVector *binVec = psVectorAlloc(nBinOrig, PS_TYPE_F32);
     783        myBin->n = myBin->nalloc;
     784        binVec->n = binVec->nalloc;
    774785
    775786        for (psS32 i=0;i<numBins;i++) {
     
    859870    psS32 vecSize = GetOverscanSize(inImg, overScanAxis);
    860871    psVector *newVec = psVectorAlloc(vecSize, PS_TYPE_F32);
     872    newVec->n = newVec->nalloc;
    861873    if ((nBin > 1) && (nBin < overscanVector->n)) {
    862874        for (psS32 i = 0 ; i < vecSize ; i++) {
     
    905917
    906918    psVector *newVec = psVectorAlloc(vecSize, PS_TYPE_F32);
     919    newVec->n = newVec->nalloc;
    907920    for (psS32 i = 0 ; i < vecSize ; i++) {
    908921        newVec->data.F32[i] = overscanVector->data.F32[i/nBin];
Note: See TracChangeset for help on using the changeset viewer.