Changeset 15761
- Timestamp:
- Dec 7, 2007, 10:06:09 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/imcombine/pmSubtractionEquation.c
r15756 r15761 358 358 return false; 359 359 } 360 361 matrix->data.F64[i][bgIndex] = sumC; 360 for (int yOrder = 0, index = i; yOrder <= spatialOrder; yOrder++) { 361 for (int xOrder = 0; xOrder <= spatialOrder - yOrder; xOrder++, index += numKernels) { 362 matrix->data.F64[index][bgIndex] = sumC * polyValues->data.F64[yOrder][xOrder]; 363 } 364 } 362 365 } 363 366 … … 582 585 583 586 // Check inputs 584 longnumParams = -1; // Number of parameters585 longnumParams2 = 0; // Number of parameters for part solution (DUAL mode)587 int numParams = -1; // Number of parameters 588 int numParams2 = 0; // Number of parameters for part solution (DUAL mode) 586 589 for (int i = 0; i < stamps->num; i++) { 587 590 pmSubtractionStamp *stamp = stamps->stamps->data[i]; // Stamp of interest … … 601 604 PS_ASSERT_IMAGE_SIZE(stamp->matrix1, numParams, numParams, false); 602 605 PS_ASSERT_IMAGE_SIZE(stamp->matrix2, numParams2, numParams2, false); 603 // XXX Not sure I've got this the right way around 604 PS_ASSERT_IMAGE_SIZE(stamp->matrixX, numParams2, numParams, false); 606 PS_ASSERT_IMAGE_SIZE(stamp->matrixX, numParams, numParams2, false); 605 607 PS_ASSERT_IMAGE_TYPE(stamp->matrix1, PS_TYPE_F64, false); 606 608 PS_ASSERT_IMAGE_TYPE(stamp->matrix2, PS_TYPE_F64, false); 607 609 PS_ASSERT_IMAGE_TYPE(stamp->matrixX, PS_TYPE_F64, false); 608 610 PS_ASSERT_VECTOR_NON_NULL(stamp->vector, false); 609 PS_ASSERT_VECTOR_SIZE(stamp->vector, numParams, false);611 PS_ASSERT_VECTOR_SIZE(stamp->vector, (long)numParams, false); 610 612 PS_ASSERT_VECTOR_TYPE(stamp->vector, PS_TYPE_F64, false); 611 613 } else { … … 614 616 numParams = stamp->vector->n; 615 617 } 616 PS_ASSERT_VECTOR_SIZE(stamp->vector, numParams, false);618 PS_ASSERT_VECTOR_SIZE(stamp->vector, (long)numParams, false); 617 619 PS_ASSERT_VECTOR_TYPE(stamp->vector, PS_TYPE_F64, false); 618 620 PS_ASSERT_IMAGE_NON_NULL(stamp->matrix1, false); … … 681 683 } 682 684 683 psVector *permutation1 , *permutation2; // Permutation vectors for LUD685 psVector *permutation1 = NULL, *permutation2 = NULL; // Permutation vectors for LUD 684 686 psImage *lu1 = psMatrixLUD(NULL, &permutation1, sumMatrix1); // LUD of matrix 1 685 687 psImage *lu2 = psMatrixLUD(NULL, &permutation2, sumMatrix2); // LUD of matrix 2
Note:
See TracChangeset
for help on using the changeset viewer.
