IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 18, 2010, 12:01:15 PM (16 years ago)
Author:
Paul Price
Message:

Reworking ppStack to not grow the rejected pixels for the unconvolved stack. Also working with convolved and unconvolved stacks separately, so they don't have to be in memory at the same time. This should reduce the memory usage of ppStack.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src/ppStackReject.c

    r27309 r27319  
    3131
    3232    float threshold = psMetadataLookupF32(NULL, recipe, "THRESHOLD.MASK"); // Threshold for mask deconvolution
    33     float poorFrac = psMetadataLookupF32(NULL, recipe, "POOR.FRACTION"); // Fraction for "poor"
    3433    float imageRej = psMetadataLookupF32(NULL, recipe, "IMAGE.REJ"); // Maximum fraction of image to reject
    3534                                                                     // before rejecting entire image
     
    109108
    110109        psPixels *reject = pmStackReject(options->inspect->data[i], options->numCols, options->numRows,
    111                                          threshold, poorFrac, stride, options->regions->data[i],
     110                                         threshold, stride, options->regions->data[i],
    112111                                         options->kernels->data[i]); // Rejected pixels
    113112
     
    130129                options->inputMask->data.PS_TYPE_VECTOR_MASK_DATA[i] |= PPSTACK_MASK_BAD;
    131130                numRejected++;
     131            } else {
     132                // Add to list of pixels already rejected
     133                reject = psPixelsConcatenate(reject, options->rejected->data[i]);
     134                options->rejected->data[i] = psPixelsDuplicates(options->rejected->data[i], reject);
    132135            }
    133         }
    134 
    135         if (reject) {
    136             // Add to list of pixels already rejected
    137             reject = psPixelsConcatenate(reject, options->rejected->data[i]);
    138             options->rejected->data[i] = psPixelsDuplicates(options->rejected->data[i], reject);
    139136        }
    140137
     
    170167
    171168    psFree(options->inspect); options->inspect = NULL;
    172     psFree(options->kernels); options->kernels = NULL;
    173     psFree(options->regions); options->regions = NULL;
    174169
    175170    if (numRejected >= num) {
Note: See TracChangeset for help on using the changeset viewer.