IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 3, 2008, 12:22:54 PM (18 years ago)
Author:
Paul Price
Message:

Threading the concatenation of inspection lists and pmStackReject.

File:
1 edited

Legend:

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

    r19337 r19346  
    4646
    4747    return status;
     48}
     49
     50
     51bool ppStackInspect(psThreadJob *job)
     52{
     53    PS_ASSERT_THREAD_JOB_NON_NULL(job, false);
     54
     55    psArray *args = job->args;  // Input arguments
     56    psArray *inspect = args->data[0]; // Array of pixel arrays
     57    int index = PS_SCALAR_VALUE(args->data[1], S32); // Index of interest
     58
     59    psArray *inputs = inspect->data[index]; // Array of interest
     60    psPixels *output = NULL;    // Output pixel list
     61    for (int i = 0; i < inputs->n; i++) {
     62        psPixels *input = inputs->data[i]; // Input pixel list
     63        if (!input || input->n == 0) {
     64            continue;
     65        }
     66        output = psPixelsConcatenate(output, input);
     67    }
     68
     69    psFree(inputs);
     70    inspect->data[index] = output;
     71
     72    return true;
    4873}
    4974
Note: See TracChangeset for help on using the changeset viewer.