IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17266


Ignore:
Timestamp:
Apr 1, 2008, 10:08:17 AM (18 years ago)
Author:
Paul Price
Message:

Adding trap for rejection of all input images.

File:
1 edited

Legend:

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

    r17265 r17266  
    457457        // Extract the rejection lists
    458458        psArray *rejected = psArrayAlloc(num); // Pixels to inspect
     459        int numRejected = 0;            // Number of inputs rejected completely
    459460        for (int i = 0; i < num; i++) {
    460461            pmReadout *ro = readouts->data[i]; // Readout of interest
     
    485486                // reject == NULL means reject image completely
    486487                reject = NULL;
     488                numRejected++;
    487489            }
    488490            rejected->data[i] = reject;
     
    490492        psFree(subKernels);
    491493        psFree(subRegions);
     494
     495        if (numRejected == num) {
     496            psError(PS_ERR_UNKNOWN, true, "All inputs completely rejected; unable to proceed.");
     497            psFree(readouts);
     498            psFree(rejected);
     499            psFree(outRO);
     500            psFree(view);
     501            return false;
     502        }
    492503
    493504        // Read convolutions by chunks
Note: See TracChangeset for help on using the changeset viewer.