Changeset 6511 for trunk/psModules/src/imsubtract/pmSubtractBias.c
- Timestamp:
- Mar 3, 2006, 3:01:34 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/imsubtract/pmSubtractBias.c (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/imsubtract/pmSubtractBias.c
r6506 r6511 6 6 * @author GLG, MHPCC 7 7 * 8 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-03-0 2 23:16:05$8 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-03-04 01:01:33 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 307 307 // XXX: use psVectorCopy if they get it working. 308 308 out->knots = psVectorAlloc(in->knots->n, in->knots->type.type); 309 out->knots->n = out->knots->nalloc; 309 310 for (psS32 i = 0 ; i < in->knots->n ; i++) { 310 311 out->knots->data.F32[i] = in->knots->data.F32[i]; … … 346 347 // Allocate the new vector. 347 348 psVector *newVec = psVectorAlloc(n, PS_TYPE_F32); 348 349 newVec->n = newVec->nalloc; 349 350 // 350 351 // If the new vector is the same size as the old, simply copy the data. … … 491 492 psS32 numOverscanImages = my_psListLength(bias); 492 493 psVector *statsAll = psVectorAlloc(numOverscanImages, PS_TYPE_F32); 494 statsAll->n = statsAll->nalloc; 493 495 psListElem *tmpOverscan = (psListElem *) bias->head; 494 496 psS32 i = 0; … … 554 556 psVector *tmpRow = psVectorAlloc(overscanImage->numCols, PS_TYPE_F32); 555 557 psVector *tmpCol = psVectorAlloc(overscanImage->numRows, PS_TYPE_F32); 558 tmpRow->n = tmpRow->nalloc; 559 tmpCol->n = tmpCol->nalloc; 556 560 557 561 // … … 594 598 psVector *tmpRow = psVectorAlloc(overscanImage->numCols, PS_TYPE_F32); 595 599 psVector *tmpCol = psVectorAlloc(overscanImage->numRows, PS_TYPE_F32); 600 tmpRow->n = tmpRow->nalloc; 601 tmpCol->n = tmpCol->nalloc; 596 602 597 603 // … … 649 655 psS32 vecSize = GetOverscanSize(inImg, overScanAxis); 650 656 psVector *overscanVector = psVectorAlloc(vecSize, PS_TYPE_F32); 657 overscanVector->n = overscanVector->nalloc; 651 658 652 659 // … … 658 665 psS32 numOverscanImages = my_psListLength(bias); 659 666 psVector **overscanVectors = (psVector **) psAlloc(numOverscanImages * sizeof(psVector *)); 667 // (*overscanVectors)->n = (*overscanVectors)->nalloc; 660 668 for (psS32 i = 0 ; i < numOverscanImages ; i++) { 661 669 overscanVectors[i] = NULL; … … 711 719 // 712 720 psVector *tmpVec = psVectorAlloc(numOverscanImages, PS_TYPE_F32); 721 tmpVec->n = tmpVec->nalloc; 713 722 psF64 statValue; 714 723 for (psS32 i = 0 ; i < vecSize ; i++) { … … 772 781 psVector *myBin = psVectorAlloc(numBins, PS_TYPE_F32); 773 782 psVector *binVec = psVectorAlloc(nBinOrig, PS_TYPE_F32); 783 myBin->n = myBin->nalloc; 784 binVec->n = binVec->nalloc; 774 785 775 786 for (psS32 i=0;i<numBins;i++) { … … 859 870 psS32 vecSize = GetOverscanSize(inImg, overScanAxis); 860 871 psVector *newVec = psVectorAlloc(vecSize, PS_TYPE_F32); 872 newVec->n = newVec->nalloc; 861 873 if ((nBin > 1) && (nBin < overscanVector->n)) { 862 874 for (psS32 i = 0 ; i < vecSize ; i++) { … … 905 917 906 918 psVector *newVec = psVectorAlloc(vecSize, PS_TYPE_F32); 919 newVec->n = newVec->nalloc; 907 920 for (psS32 i = 0 ; i < vecSize ; i++) { 908 921 newVec->data.F32[i] = overscanVector->data.F32[i/nBin];
Note:
See TracChangeset
for help on using the changeset viewer.
