Changeset 2130
- Timestamp:
- Oct 14, 2004, 11:44:08 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/pmNonLinear.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/pmNonLinear.c
r2125 r2130 5 5 * @author George Gusciora, MHPCC 6 6 * 7 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $8 * @date $Date: 2004-10-14 19:01:37$7 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2004-10-14 21:44:08 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 21 21 #include "pmNonLinear.h" 22 22 23 /****************************************************************************** 24 pmNonLinearityLookup(): This routine will take an psReadout image as input 25 and a 1-D polynomial. For each pixel in the input image, the polynomial will 26 be evaluated at that pixels value, and the image pixel will then be set to 27 that value. 28 *****************************************************************************/ 29 23 30 psReadout *pmNonLinearityPolynomial(psReadout *in, 24 31 const psPolynomial1D *coeff) … … 32 39 33 40 for (i=0;i<(in->image)->numRows;i++) { 34 for (j=0;j<(in->image)->num Rows;j++) {41 for (j=0;j<(in->image)->numCols;j++) { 35 42 (in->image)->data.F32[i][j] = psPolynomial1DEval((in->image)->data.F32[i][j], coeff); 36 43 } … … 40 47 41 48 49 /****************************************************************************** 50 pmNonLinearityLookup(): This routine will take an psReadout image as input 51 and two input vectors, which constitute a lookup table. For each pixel in 52 the input image, that pixels value will be determined in the input vector 53 inFluxe, and the corresponding value in outFlux. The image pixel will then 54 be set to the value from outFlux. 55 *****************************************************************************/ 42 56 psReadout *pmNonLinearityLookup(psReadout *in, 43 57 const psVector *inFlux, … … 57 71 float slope; 58 72 73 x.type.type = PS_TYPE_F32; 59 74 if (inFlux->n != outFlux->n) { 60 75 // XXX: psWarning("pmNonLinearityLookup(): input vectors have different size"); … … 65 80 return(in); 66 81 } 67 68 82 for (i=0;i<(in->image)->numRows;i++) { 69 83 for (j=0;j<(in->image)->numCols;j++) { 70 84 x.data.F32 = (in->image)->data.F32[i][j]; 85 71 86 binNum = p_psVectorBinDisect((psVector *)inFlux, &x); 72 87
Note:
See TracChangeset
for help on using the changeset viewer.
