IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 18508


Ignore:
Timestamp:
Jul 14, 2008, 11:28:46 AM (18 years ago)
Author:
Paul Price
Message:

Fix to allow an image to have no pixels to inspect/reject.

Location:
trunk
Files:
2 edited

Legend:

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

    r18507 r18508  
    1515
    1616#define WCS_TOLERANCE 0.001             // Tolerance for WCS
     17#define PIXELS_BUFFER 1024              // Initial size of pixel lists
    1718
    1819// Here follows lists of files for activation/deactivation at various stages.  Each must be NULL-terminated.
     
    576577                continue;
    577578            }
    578             psPixels *inspect = NULL;  // Inspection list for this readout
     579            psPixels *inspect = psPixelsAllocEmpty(PIXELS_BUFFER); // Inspection list for this readout
    579580            psMetadataIterator *iter = psMetadataIteratorAlloc(ro->analysis, PS_LIST_HEAD,
    580581                                                               "^" PPSTACK_INSPECT_PIXELS "$"); // Iterator
     
    592593            pmReadoutFreeData(ro);
    593594
    594             psLogMsg("ppStack", PS_LOG_INFO, "%ld total pixels to inspect from image %d",
    595                      inspect ? inspect->n : 0, i);
     595            psLogMsg("ppStack", PS_LOG_INFO, "%ld total pixels to inspect from image %d", inspect->n, i);
    596596
    597597            psPixels *reject = pmStackReject(inspect, NULL, threshold, subRegions->data[i],
  • trunk/psModules/src/imcombine/pmStackReject.c

    r17299 r18508  
    2323    PS_ASSERT_ARRAY_NON_NULL(kernels, NULL);
    2424    PS_ASSERT_ARRAYS_SIZE_EQUAL(subRegions, kernels, NULL);
     25
     26    // Trivial case
     27    if (in->n == 0) {
     28        return psPixelsAllocEmpty(0);
     29    }
    2530
    2631    // Get the original image size
Note: See TracChangeset for help on using the changeset viewer.