Changeset 5516 for trunk/psModules/src/detrend/pmNonLinear.c
- Timestamp:
- Nov 15, 2005, 10:09:03 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/detrend/pmNonLinear.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/detrend/pmNonLinear.c
r5435 r5516 5 5 * @author GLG, MHPCC 6 6 * 7 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $8 * @date $Date: 2005-1 0-20 23:06:24$7 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2005-11-15 20:09:03 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 22 22 23 23 #include "pmNonLinear.h" 24 #include "pmSubtractBias.h" 24 25 25 26 /****************************************************************************** … … 37 38 PS_ASSERT_IMAGE_TYPE(inputReadout->image, PS_TYPE_F32, NULL); 38 39 PS_ASSERT_PTR_NON_NULL(input1DPoly, NULL); 40 PS_WARN_PTR_NON_NULL(inputReadout->parent); 41 if (inputReadout->parent != NULL) { 42 PS_WARN_PTR_NON_NULL(inputReadout->parent->concepts); 43 } 44 // 45 // Determine trimmed image from metadata. 46 // 47 psImage *trimmedImg = p_psDetermineTrimmedImage(inputReadout); 39 48 40 psS32 i; 41 psS32 j; 42 43 for (i=0;i<inputReadout->image->numRows;i++) { 44 for (j=0;j<inputReadout->image->numCols;j++) { 45 inputReadout->image->data.F32[i][j] = psPolynomial1DEval(input1DPoly, inputReadout->image->data.F32[i][j]); 49 for (psS32 i=0;i<trimmedImg->numRows;i++) { 50 for (psS32 j=0;j<trimmedImg->numCols;j++) { 51 trimmedImg->data.F32[i][j] = psPolynomial1DEval(input1DPoly, 52 trimmedImg->data.F32[i][j]); 46 53 } 47 54 } … … 68 75 PS_ASSERT_PTR_NON_NULL(inputReadout->image,NULL); 69 76 PS_ASSERT_IMAGE_TYPE(inputReadout->image, PS_TYPE_F32, NULL); 77 PS_WARN_PTR_NON_NULL(inputReadout->parent); 78 if (inputReadout->parent != NULL) { 79 PS_WARN_PTR_NON_NULL(inputReadout->parent->concepts); 80 } 81 // 82 // Determine trimmed image from metadata. 83 // 84 psImage *trimmedImg = p_psDetermineTrimmedImage(inputReadout); 85 70 86 psLookupTable *tmpLT = psLookupTableAlloc(filename, "%f %f", 0); 71 87 psS32 numLines = psLookupTableRead(tmpLT); … … 75 91 "WARNING: Lookup Table is too small. Returning original pmReadout.\n"); 76 92 } else { 77 for (psS32 i=0;i< inputReadout->image->numRows;i++) {78 for (psS32 j=0;j< inputReadout->image->numCols;j++) {79 psF64 tmpD = psLookupTableInterpolate(tmpLT, inputReadout->image->data.F32[i][j], 1);93 for (psS32 i=0;i<trimmedImg->numRows;i++) { 94 for (psS32 j=0;j<trimmedImg->numCols;j++) { 95 psF64 tmpD = psLookupTableInterpolate(tmpLT, trimmedImg->data.F32[i][j], 1); 80 96 if (!isnan(tmpD)) { 81 inputReadout->image->data.F32[i][j] = tmpD;97 trimmedImg->data.F32[i][j] = tmpD; 82 98 } else { 83 99 numPixels++;
Note:
See TracChangeset
for help on using the changeset viewer.
