IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 15789


Ignore:
Timestamp:
Dec 11, 2007, 6:29:15 PM (18 years ago)
Author:
Paul Price
Message:

Fixing stamp regions --- weren't going the full length of the image.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/imcombine/pmSubtractionStamps.c

    r15787 r15789  
    122122    }
    123123    int xSize = xMax - xMin, ySize = yMax - yMin; // Size of region of interest
    124     int xStamps = xSize / spacing + 1, yStamps = ySize / spacing + 1; // Number of stamps in x and y
     124    int xStamps = (float)xSize / spacing + 1, yStamps = (float)ySize / spacing + 1; // Number of stamps
    125125
    126126    list->num = xStamps * yStamps;
     
    129129
    130130    for (int y = 0, index = 0; y < yStamps; y++) {
    131         int yStart = yMin + y * ((float)ySize / (float)(yStamps + 1)); // Subregion starts here
    132         int yStop = yMin + (y + 1) * ((float)ySize / (float)(yStamps + 1)) - 1; // Subregion stops here
     131        int yStart = yMin + y * ((float)ySize / (float)(yStamps)); // Subregion starts here
     132        int yStop = yMin + (y + 1) * ((float)ySize / (float)(yStamps)) - 1; // Subregion stops here
    133133        assert(yStart >= yMin && yStop < yMax);
    134134
    135135        for (int x = 0; x < xStamps; x++, index++) {
    136             int xStart = xMin + x * ((float)xSize / (float)(xStamps + 1)); // Subregion starts here
    137             int xStop = xMin + (x + 1) * ((float)xSize / (float)(xStamps + 1)) - 1; // Subregion stops here
     136            int xStart = xMin + x * ((float)xSize / (float)(xStamps)); // Subregion starts here
     137            int xStop = xMin + (x + 1) * ((float)xSize / (float)(xStamps)) - 1; // Subregion stops here
    138138            assert(xStart >= xMin && xStop < xMax);
    139139
Note: See TracChangeset for help on using the changeset viewer.