Changeset 25198 for trunk/magic/remove/src/streaksremove.c
- Timestamp:
- Aug 25, 2009, 3:27:16 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/magic/remove/src/streaksremove.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/magic/remove/src/streaksremove.c
r25084 r25198 18 18 static void updateAstrometry(streakFiles *sfiles); 19 19 static void censorSources(streakFiles *sfiles, psU32 maskStreak); 20 static long censorPixels(streakFiles *sfiles, psImage * pixels, bool checkNonWarpedPixels, psU16 maskStreak); 20 21 21 22 int … … 146 147 } 147 148 148 149 149 psTimerStart("REMOVE_STREAKS"); 150 150 151 for (int y=0 ; y < sfiles->inImage->numRows; y++) { 152 for (int x = 0; x < sfiles->inImage->numCols; x++) { 153 if (psImageGet(pixels, x, y)) { 154 ++totalStreakPixels; 155 if (!checkNonWarpedPixels || warpedPixel(sfiles, x, y)) { 156 157 excisePixel(sfiles, x, y, true, maskStreak); 158 159 } else { 160 // This pixel was not included in any warp and has thus already excised 161 // by exciseNonWarpedPixels 162 } 163 } 164 } 165 } 151 totalStreakPixels += censorPixels(sfiles, pixels, checkNonWarpedPixels, maskStreak); 166 152 167 153 psLogMsg("streaksremove", PS_LOG_INFO, "time to remove streak pixels: %f\n", psTimerClear("REMOVE_STREAKS")); … … 254 240 255 241 return 0; 242 } 243 244 static long 245 censorPixels(streakFiles *sfiles, psImage *pixels, bool checkNonWarpedPixels, psU16 maskStreak) 246 { 247 long streakPixels = 0; 248 249 for (int y=0 ; y < sfiles->inImage->numRows; y++) { 250 for (int x = 0; x < sfiles->inImage->numCols; x++) { 251 if (psImageGet(pixels, x, y)) { 252 ++streakPixels; 253 if (!checkNonWarpedPixels || warpedPixel(sfiles, x, y)) { 254 255 excisePixel(sfiles, x, y, true, maskStreak); 256 257 } else { 258 // This pixel was not included in any warp and has thus already excised 259 // by exciseNonWarpedPixels 260 } 261 } 262 } 263 } 264 return streakPixels; 256 265 } 257 266
Note:
See TracChangeset
for help on using the changeset viewer.
