- Timestamp:
- Jan 29, 2010, 6:02:38 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20091201/psModules/src/imcombine/pmSubtractionStamps.c
r26735 r26739 709 709 } 710 710 } 711 fprintf(stderr, "Normalization window radius: %d\n", stamps->normWindow);712 711 713 712 psTrace("psModules.imcombine", 3, "Normalisation window radius set to %d\n", stamps->normWindow); … … 741 740 742 741 bool pmSubtractionStampsExtract(pmSubtractionStampList *stamps, psImage *image1, psImage *image2, 743 psImage *variance, int kernelSize )742 psImage *variance, int kernelSize, psRegion bounds) 744 743 { 745 744 PM_ASSERT_SUBTRACTION_STAMP_LIST_NON_NULL(stamps, false); … … 758 757 } 759 758 760 int numCols = image1->numCols, numRows = image1->numRows; // Size of images761 759 int size = kernelSize + stamps->footprint; // Size of postage stamps 762 760 … … 767 765 } 768 766 769 if (isnan(stamp->xNorm)) { 770 stamp->xNorm = 2.0 * (stamp->x - (float)numCols/2.0) / (float)numCols; 771 } 772 if (isnan(stamp->yNorm)) { 773 stamp->yNorm = 2.0 * (stamp->y - (float)numRows/2.0) / (float)numRows; 774 } 767 p_pmSubtractionPolynomialNormCoords(&stamp->xNorm, &stamp->yNorm, stamp->x, stamp->y, 768 bounds.x0, bounds.x1, bounds.y0, bounds.y1); 775 769 776 770 int x = stamp->x + 0.5, y = stamp->y + 0.5; // Stamp coordinates 777 if (x < size || x > numCols - size || y < size || y > numRows- size) {778 psError(PS_ERR_UNKNOWN, false, "Stamp %d (%d,%d) is within the imageborder.\n", i, x, y);771 if (x < bounds.x0 + size || x > bounds.x1 - size || y < bounds.y0 + size || y > bounds.y1 - size) { 772 psError(PS_ERR_UNKNOWN, false, "Stamp %d (%d,%d) is within the region border.\n", i, x, y); 779 773 return false; 780 774 }
Note:
See TracChangeset
for help on using the changeset viewer.
