IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 31, 2005, 5:07:12 PM (21 years ago)
Author:
Paul Price
Message:

Working very nicely now.

File:
1 edited

Legend:

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

    r3387 r3610  
    113113                   const psArray *masks, // Masks of input images
    114114                   const psImage *region, // Region of interest for transformation
     115                   const psVector *scales, // Relative scales
     116                   const psVector *offsets, // Relative offsets
    115117                   const stacConfig *config // Configuration
    116118    )
     
    123125    assert(images->n == maps->n);
    124126    assert(!errors || (images->n == errors->n));
     127    assert(!scales || scales->n == images->n);
     128    assert(!offsets || offsets->n == images->n);
     129    assert(!scales || scales->type.type == PS_TYPE_F32);
     130    assert(!offsets || offsets->type.type == PS_TYPE_F32);
    125131
    126132    // Allocate the output images if required, otherwise check the number
     
    170176        psImage *outImage = (*outputs)->data[n]; // The output image
    171177        psImage *outError = (*outErrors)->data[n]; // The output error image
     178        float offset = 0.0;             // Relative offset
     179        float scale = 1.0;              // Relative scale
     180        if (offsets) {
     181            offset = offsets->data.F32[n];
     182        }
     183        if (scales) {
     184            scale = scales->data.F32[n];
     185        }
    172186
    173187#if 0
     
    206220                                                                                            detector->y,
    207221                                                                                            mask, 1, 0.0);
     222
     223                    outImage->data.F32[y][x] = (outImage->data.F32[y][x] - offset) / scale;
     224                    outImage->data.F32[y][x] = outImage->data.F32[y][x] / SQUARE(scale);
     225
    208226                } // Pixels of interest
    209227
Note: See TracChangeset for help on using the changeset viewer.