Changeset 27086 for trunk/psModules/src/imcombine/pmSubtractionEquation.c
- Timestamp:
- Feb 25, 2010, 12:33:42 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/imcombine/pmSubtractionEquation.c
r26893 r27086 7 7 #include <pslib.h> 8 8 9 #include "pmErrorCodes.h" 9 10 #include "pmSubtraction.h" 10 11 #include "pmSubtractionKernels.h" … … 718 719 // Generate convolutions: these are generated once and saved 719 720 if (!pmSubtractionConvolveStamp(stamp, kernels, footprint)) { 720 psError( PS_ERR_UNKNOWN, false, "Unable to convolve stamp %d.", index);721 psError(psErrorCodeLast(), false, "Unable to convolve stamp %d.", index); 721 722 return NULL; 722 723 } … … 869 870 870 871 if (!psThreadPoolWait(true)) { 871 psError( PS_ERR_UNKNOWN, false, "Error waiting for threads.");872 psError(psErrorCodeLast(), false, "Error waiting for threads."); 872 873 return false; 873 874 } … … 989 990 psStats *stats = psStatsAlloc(PS_STAT_ROBUST_MEDIAN); // Statistics for norm 990 991 if (!psVectorStats(stats, norms, NULL, NULL, 0)) { 991 psError(P S_ERR_UNKNOWN, false, "Unable to determine median normalisation");992 psError(PM_ERR_DATA, false, "Unable to determine median normalisation"); 992 993 psFree(stats); 993 994 psFree(sumMatrix); … … 1134 1135 psStats *stats = psStatsAlloc(PS_STAT_ROBUST_MEDIAN); // Statistics for norm 1135 1136 if (!psVectorStats(stats, norms, NULL, NULL, 0)) { 1136 psError(P S_ERR_UNKNOWN, false, "Unable to determine median normalisation");1137 psError(PM_ERR_DATA, false, "Unable to determine median normalisation"); 1137 1138 psFree(stats); 1138 1139 psFree(sumMatrix); … … 1371 1372 false); // Kernel image 1372 1373 if (!image) { 1373 psError( PS_ERR_UNKNOWN, false, "Unable to generate image of kernel.");1374 psError(psErrorCodeLast(), false, "Unable to generate image of kernel."); 1374 1375 return false; 1375 1376 } … … 1947 1948 psVector *w = NULL; 1948 1949 if (!psMatrixSVD (&U, &w, &V, kernelMatrix)) { 1949 psError( PS_ERR_UNKNOWN, false, "failed to perform SVD on sumMatrix\n");1950 psError(psErrorCodeLast(), false, "failed to perform SVD on sumMatrix\n"); 1950 1951 return NULL; 1951 1952 } … … 2087 2088 psImage *luMatrix = psMatrixLUDecomposition(NULL, &permutation, sumMatrix); 2088 2089 if (!luMatrix) { 2089 psError(P S_ERR_UNKNOWN, true, "LU Decomposition of least-squares matrix failed.\n");2090 psError(PM_ERR_DATA, true, "LU Decomposition of least-squares matrix failed.\n"); 2090 2091 psFree(solution); 2091 2092 psFree(sumVector); … … 2100 2101 psFree(permutation); 2101 2102 if (!solution) { 2102 psError(P S_ERR_UNKNOWN, true, "Failed to solve the least-squares system.\n");2103 psError(PM_ERR_DATA, true, "Failed to solve the least-squares system.\n"); 2103 2104 psFree(solution); 2104 2105 psFree(sumVector);
Note:
See TracChangeset
for help on using the changeset viewer.
