IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2764 for trunk/stac/src/stac.c


Ignore:
Timestamp:
Dec 20, 2004, 6:15:28 PM (22 years ago)
Author:
Paul Price
Message:

Running faster now by only transforming rejection masks where we're interested. To do: only transform and combine in the second iteration for areas where we're interested

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/stac/src/stac.c

    r2751 r2764  
    7272#endif
    7373
     74    // Get regions of interest in the source frame
     75    psArray *regions = psArrayAlloc(inputs->n); // Array of images denoting regions of interest
     76    for (int i = 0; i < inputs->n; i++) {
     77        fprintf(stderr, "Finding area of interest for image %d\n", i);
     78        regions->data[i] = stacAreaOfInterest(rejected->data[i], inverseMaps->data[i],
     79                                              ((psImage*)(inputs->data[i]))->numCols,
     80                                              ((psImage*)(inputs->data[i]))->numRows);
     81#ifdef TESTING
     82        char regionFile[MAXCHAR];       // Filename of region image
     83        sprintf(regionFile,"%s.region",config->inputs->data[i]);
     84        psImageWriteSection(regions->data[i], 0, 0, 0, NULL, 0, regionFile);
     85#endif
     86    }
     87
    7488    // Transform rejected pixels to source frame
    75     psArray *rejectedSource = stacRejection(inputs, transformed, combined, maps, inverseMaps, rejected, config);
     89    psArray *rejectedSource = stacRejection(inputs, rejected, regions, maps, inverseMaps, config);
    7690
    7791    // Redo transformation with the mask
     
    93107    // Free everything I've used
    94108    stacConfigFree(config);
     109    psFree(regions);
    95110    psFree(inputs);
    96111    psFree(maps);
Note: See TracChangeset for help on using the changeset viewer.