Changeset 25834 for branches/pap/psModules/src/imcombine/pmSubtraction.c
- Timestamp:
- Oct 13, 2009, 11:30:52 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/pap/psModules/src/imcombine/pmSubtraction.c
r25833 r25834 964 964 } 965 965 966 #if 0966 #if 1 967 967 psArray *pmSubtractionKernelSolutions(const pmSubtractionKernels *kernels, float x, float y, bool wantDual) 968 968 { … … 972 972 PS_ASSERT_FLOAT_WITHIN_RANGE(y, -1.0, 1.0, NULL); 973 973 974 psArray *images = psArrayAlloc(kernels->solution1->n - 1); // Images of each kernel to return 975 psVector *fakeSolution = psVectorAlloc(kernels->solution1->n, PS_TYPE_F64); // Fake solution vector 976 psVectorInit(fakeSolution, 0.0); 977 978 for (int i = 0; i < kernels->solution1->n - 1; i++) { 979 fakeSolution->data.F64[i] = kernels->solution1->data.F64[i]; 974 psVector *solution = wantDual ? kernels->solution2 : kernels->solution1; // Solution of interest 975 psVector *backup = psVectorCopy(NULL, solution, PS_TYPE_F64); // Backup version 976 977 int num = wantDual ? solution->n - 1 : solution->n; // Number of kernel basis functions 978 979 psArray *images = psArrayAlloc(num); // Images of each kernel to return 980 psVectorInit(solution, 0.0); 981 982 for (int i = 0; i < num; i++) { 983 solution->data.F64[i] = backup->data.F64[i]; 980 984 images->data[i] = pmSubtractionKernelImage(kernels, x, y, wantDual); 981 fakeSolution->data.F64[i] = 0.0;982 } 983 984 psFree( fakeSolution);985 solution->data.F64[i] = 0.0; 986 } 987 psVectorCopy(solution, backup, PS_TYPE_F64); 988 psFree(backup); 985 989 986 990 return images;
Note:
See TracChangeset
for help on using the changeset viewer.
