Changeset 27222 for trunk/magic/remove/src/streaksremove.c
- Timestamp:
- Mar 8, 2010, 7:39:53 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/magic/remove/src/streaksremove.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/magic/remove/src/streaksremove.c
r26983 r27222 12 12 static pmConfig *parseArguments(int argc, char **argv); 13 13 static bool readAndCopyToOutput(streakFiles *sf, bool exciseAll); 14 static voidexciseNonDiffedPixels(streakFiles *sfiles, psImageMaskType newMaskValue);14 static long exciseNonDiffedPixels(streakFiles *sfiles, psImageMaskType newMaskValue); 15 15 static bool diffedPixel(streakFiles *sfiles, int x, int y); 16 16 static void excisePixel(streakFiles *sfiles, unsigned int x, unsigned int y, bool streak, psImageMaskType newMaskValue); … … 104 104 long totalPixels = 0; 105 105 long totalStreakPixels = 0; 106 long unDiffedPixels = 0; 106 107 107 108 // accumulators for the various timers … … 153 154 // set non-diffed pixels and variance to NAN, mask to maskStreak (since the pixel 154 155 // is excised as part of the destreaking process) 155 exciseNonDiffedPixels(sfiles, sfiles->maskStreak);156 unDiffedPixels += exciseNonDiffedPixels(sfiles, sfiles->maskStreak); 156 157 157 158 enw_t += psTimerClear("EXCISE_NON_DIFFED"); … … 217 218 psLogMsg("streaksremove", PS_LOG_INFO, "pixels: %ld streak pixels: %ld %4.2f%%\n", totalPixels, totalStreakPixels, streakFraction * 100); 218 219 psMetadataAddF32(sfiles->stats, PS_LIST_TAIL, "STREAK_FRACTION", PS_META_REPLACE, "", streakFraction); 220 221 psF64 unDiffedFraction = (double) unDiffedPixels / totalPixels; 222 psLogMsg("streaksremove", PS_LOG_INFO, "pixels: %ld undiffed pixels: %ld %4.2f%%\n", totalPixels, unDiffedPixels, unDiffedFraction * 100); 223 psMetadataAddF32(sfiles->stats, PS_LIST_TAIL, "UNDIFFED_FRACTION", PS_META_REPLACE, "", unDiffedFraction); 219 224 220 225 // check the weight and mask files for extra extensions that might be in files … … 795 800 } 796 801 797 static void802 static long 798 803 exciseNonDiffedPixels(streakFiles *sfiles, psImageMaskType newMaskValue) 799 804 { … … 804 809 int numCols = sfiles->inImage->numCols; // for raw images this was calculated from the width of datasec 805 810 int numRows = sfiles->inImage->numRows; // for raw images this was calculated from the height of datasec 811 812 long excisedPixels = 0; 806 813 807 814 // printf("%2d x0: %4d y0: %4d xpar: %d ypar: %d\n", sfiles->extnum, cell_x0, cell_y0, xParity, yParity); … … 825 832 if (! *pixels ) { 826 833 excisePixel(sfiles, xCell, yCell, false, newMaskValue); 834 excisedPixels++; 827 835 } 828 836 } … … 834 842 if (!*pixels) { 835 843 excisePixel(sfiles, xCell, yCell, false, newMaskValue); 844 excisedPixels++; 836 845 } 837 846 } 838 847 } 839 848 } 849 return excisedPixels; 840 850 } 841 851
Note:
See TracChangeset
for help on using the changeset viewer.
