Changeset 7858 for trunk/psModules/src/detrend/pmFlatField.c
- Timestamp:
- Jul 10, 2006, 10:54:52 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/detrend/pmFlatField.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/detrend/pmFlatField.c
r7857 r7858 18 18 * @author Ross Harman, MHPCC 19 19 * 20 * @version $Revision: 1.1 2$ $Name: not supported by cvs2svn $21 * @date $Date: 2006-07-10 20: 46:57$20 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $ 21 * @date $Date: 2006-07-10 20:54:52 $ 22 22 * 23 23 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 33 33 34 34 #include <pslib.h> 35 #include "pmFPA.h" 35 36 #include "pmFlatField.h" 36 37 #include "pmFPAMaskWeight.h" … … 56 57 psImage *flatImage = flat->image; // Flat-field image 57 58 58 // Check input image and its mask are not larger than flat image59 // Check input image is not larger than flat image; mask is the same size as the input 59 60 if (inImage->numRows > flatImage->numRows || inImage->numCols > flatImage->numCols) { 60 psError(PS_ERR_BAD_PARAMETER_SIZE, true, 61 PS_ERRORTEXT_pmFlatField_SIZE_INPUT_IMAGE, 62 inImage->numRows, inImage->numCols, flatImage->numRows, flatImage->numCols); 63 return false; 64 } 65 if (inMask && (inMask->numRows > flatImage->numRows || inMask->numCols > flatImage->numCols)) { 66 psError(PS_ERR_BAD_PARAMETER_SIZE, true, 67 PS_ERRORTEXT_pmFlatField_SIZE_MASK_IMAGE, 68 inMask->numRows, inMask->numCols, flatImage->numRows, flatImage->numCols); 61 psError(PS_ERR_BAD_PARAMETER_SIZE, true, "Input image (%dx%d) is larger than flat-field image " 62 "(%dx%d).\n", inImage->numCols, inImage->numRows, flatImage->numCols, flatImage->numRows); 69 63 return false; 70 64 } … … 81 75 82 76 // Check that offsets are within image limits 83 if (inImage->numRows + yOffset > =flatImage->numRows ||84 inImage->numCols + xOffset > =flatImage->numCols) {85 psError(PS_ERR_BAD_PARAMETER_SIZE, true, 86 PS_ERRORTEXT_pmFlatField_OFFSET_FLAT_IMAGE,87 yOffset, xOffset, flatImage->numRows, flatImage->numCols);77 if (inImage->numRows + yOffset > flatImage->numRows || 78 inImage->numCols + xOffset > flatImage->numCols) { 79 psError(PS_ERR_BAD_PARAMETER_SIZE, true, "Input image (%dx%d) with offsets (%d,%d) is larger than " 80 "flat-field image (%dx%d).\n", inImage->numCols, inImage->numRows, xOffset, yOffset, 81 flatImage->numCols, flatImage->numRows); 88 82 return false; 89 83 } … … 118 112 FLAT_DIVISION_CASE(F64, NAN); 119 113 default: 120 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 121 PS_ERRORTEXT_pmFlatField_TYPE_UNSUPPORTED, 122 inImage->type.type); 114 psError(PS_ERR_BAD_PARAMETER_TYPE, true, "Unsupported type for input image: %x\n", inImage->type.type); 123 115 return false; 124 116 }
Note:
See TracChangeset
for help on using the changeset viewer.
