IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 5, 2005, 11:51:26 AM (21 years ago)
Author:
Paul Price
Message:

Removing stac-specific configuration out of functions so that I can use them in other programs. Program appears to work as it did before.

File:
1 edited

Legend:

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

    r3610 r3666  
    44#include "stac.h"
    55
    6 bool stacSize(stacConfig *config,       // Configuration, containing the output size
     6bool stacSize(int *outnx, int *outny,   // Size of output image (returned)
     7              float *xMapDiff, float *yMapDiff, // Difference applied to maps
    78              const psArray *images,    // Input images
    89              psArray *maps             // Transformation maps
     
    9192
    9293    // Tweak the maps to account for the offset
    93     config->xMapDiff = floor(xMin);
    94     config->yMapDiff = floor(yMin);
     94    *xMapDiff = floor(xMin);
     95    *yMapDiff = floor(yMin);
    9596    for (int i = 0; i < nImages; i++) {
    9697        psPlaneTransform *map = maps->data[i]; // The map of interest
     
    99100    }
    100101
    101     config->outnx = (int)(xMax + 0.5) - (int)xMin;
    102     config->outny = (int)(yMax + 0.5) - (int)yMin;
     102    *outnx = (int)(xMax + 0.5) - (int)xMin;
     103    *outny = (int)(yMax + 0.5) - (int)yMin;
    103104
    104     psTrace("stac.size", 1, "Output size is to be %dx%d\n", config->outnx, config->outny);
     105    psTrace("stac.size", 1, "Output size is to be %dx%d\n", *outnx, *outny);
    105106
    106107    psFree(inCoord);
Note: See TracChangeset for help on using the changeset viewer.