IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 27159


Ignore:
Timestamp:
Mar 3, 2010, 1:47:03 PM (16 years ago)
Author:
Paul Price
Message:

Actually deal with case where number of images is small.

File:
1 edited

Legend:

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

    r27158 r27159  
    188188    options->sumExposure = sumExpTime;
    189189
     190    if (numGoodImages == 0) {
     191        psLogMsg("ppStack", PS_LOG_WARN, "No images with sources to measure transparency.");
     192        options->quality = PPSTACK_ERR_REJECTED;
     193        return true;
     194    }
     195    if (numGoodImages == 1) {
     196        psArray *sources = NULL;        // Sources
     197        for (int i = 0; i < num && !sources; i++) {
     198            if (options->inputMask->data.PS_TYPE_VECTOR_MASK_DATA[i]) {
     199                continue;
     200            }
     201            sources = sourceLists->data[i];
     202        }
     203        options->sources = psMemIncrRefCounter(sources);
     204        psLogMsg("ppStack", PS_LOG_WARN, "Single image with sources --- no need to match transparency.");
     205        return true;
     206    }
     207
    190208    psArray *matches = pmSourceMatchSources(sourceLists, radius, true); // List of matches
    191209    if (!matches) {
Note: See TracChangeset for help on using the changeset viewer.