IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3683


Ignore:
Timestamp:
Apr 7, 2005, 2:27:03 PM (21 years ago)
Author:
Paul Price
Message:

Adding program to clip out NaN so that sExtractor can work properly.

Location:
trunk/stac/src
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/stac/src/Makefile

    r3673 r3683  
    1515SHIFTSIZE = shiftSize.o stacWrite.o stacConfig.o stacRead.o stacCheckMemory.o stacSize.o
    1616
    17 TARGETS = stac shift combine shiftSize
     17FIXIMAGE = fixImage.o
     18
     19TARGETS = stac shift combine shiftSize fixImage
    1820
    1921.PHONY: tags clean empty test profile optimise all
     
    3335shiftSize:      $(SHIFTSIZE)
    3436                $(CC) $(CFLAGS) -o $@ $(SHIFTSIZE) $(LDFLAGS) $(OPTFLAGS)
     37
     38fixImage:       $(FIXIMAGE)
     39                $(CC) $(CFLAGS) -o $@ $(FIXIMAGE) $(LDFLAGS) $(OPTFLAGS)
    3540
    3641all:            $(TARGETS)
  • trunk/stac/src/stacSize.c

    r3669 r3683  
    9494    // Tweak the maps to account for the offset
    9595    if (xMapDiff != NULL) {
    96         *xMapDiff = floor(xMin);
     96        *xMapDiff = floorf(xMin);
    9797    }
    9898    if (yMapDiff != NULL) {
    99         *yMapDiff = floor(yMin);
     99        *yMapDiff = floorf(yMin);
    100100    }
    101101    for (int i = 0; i < nImages; i++) {
    102102        psPlaneTransform *map = maps->data[i]; // The map of interest
    103         map->x->coeff[0][0] -= floor(xMin);
    104         map->y->coeff[0][0] -= floor(yMin);
     103        map->x->coeff[0][0] -= floorf(xMin);
     104        map->y->coeff[0][0] -= floorf(yMin);
    105105    }
    106106
    107     *outnx = (int)(xMax + 0.5) - (int)xMin;
    108     *outny = (int)(yMax + 0.5) - (int)yMin;
     107    *outnx = (int)ceilf(xMax - xMin);
     108    *outny = (int)ceilf(yMax - yMin);
    109109
    110110    psTrace("stac.size", 1, "Output size is to be %dx%d\n", *outnx, *outny);
Note: See TracChangeset for help on using the changeset viewer.