IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 16424


Ignore:
Timestamp:
Feb 13, 2008, 2:14:04 PM (18 years ago)
Author:
Paul Price
Message:

Attempting to support stacking of images when they are read piecemeal (scan by scan). Need to specify size of the (original) image, so that normalisation can be done (during convolution) when the image size is not the original image size. Doing some algebraic gymnastics in the pixel rejection to account for the image being smaller than the original.

Location:
branches/pap_branch_080207/ppStack/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/pap_branch_080207/ppStack/src/ppStackMatch.c

    r16418 r16424  
    141141        while ((item = psMetadataGetAndIncrement(iter))) {
    142142            assert(item->type == PS_DATA_UNKNOWN);
    143             *kernels = psArrayAdd(*kernels, ARRAY_BUFFER, item->data.V);
     143            // Set the normalisation dimensions, since these will be otherwise unavailable when reading the
     144            // images by scans.
     145            pmSubtractionKernels *kernel = item->data.V; // Kernel used in subtraction
     146            kernel->numCols = readout->image->numCols;
     147            kernel->numRows = readout->image->numRows;
     148
     149            *kernels = psArrayAdd(*kernels, ARRAY_BUFFER, kernel);
    144150        }
    145151        psFree(iter);
  • branches/pap_branch_080207/ppStack/src/ppStackReadout.c

    r16407 r16424  
    137137    for (int i = 0; i < num; i++) {
    138138        pmStackData *data = stack->data[i]; // Data for this image
    139         psPixels *reject = pmStackReject(data->pixels, threshold, regions->data[i],
     139        pmReadout *readout = data->readout; // Readout of interest
     140        int col0 = readout->col0, row0 = readout->row0; // Offset for readout
     141        int numCols = readout->image->numCols, numRows = readout->image->numRows; // Size of image
     142
     143        psRegion *valid = psRegionAlloc(col0, col0 + numCols, row0, row0 + numRows); // Valid region for rej
     144        psPixels *reject = pmStackReject(data->pixels, valid, threshold, regions->data[i],
    140145                                         kernels->data[i]); // Pixels to reject
     146        psFree(valid);
    141147        psFree(data->pixels);
    142148        data->pixels = reject;
Note: See TracChangeset for help on using the changeset viewer.