Changeset 15789
- Timestamp:
- Dec 11, 2007, 6:29:15 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/imcombine/pmSubtractionStamps.c
r15787 r15789 122 122 } 123 123 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 y124 int xStamps = (float)xSize / spacing + 1, yStamps = (float)ySize / spacing + 1; // Number of stamps 125 125 126 126 list->num = xStamps * yStamps; … … 129 129 130 130 for (int y = 0, index = 0; y < yStamps; y++) { 131 int yStart = yMin + y * ((float)ySize / (float)(yStamps + 1)); // Subregion starts here132 int yStop = yMin + (y + 1) * ((float)ySize / (float)(yStamps + 1)) - 1; // Subregion stops here131 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 133 133 assert(yStart >= yMin && yStop < yMax); 134 134 135 135 for (int x = 0; x < xStamps; x++, index++) { 136 int xStart = xMin + x * ((float)xSize / (float)(xStamps + 1)); // Subregion starts here137 int xStop = xMin + (x + 1) * ((float)xSize / (float)(xStamps + 1)) - 1; // Subregion stops here136 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 138 138 assert(xStart >= xMin && xStop < xMax); 139 139
Note:
See TracChangeset
for help on using the changeset viewer.
