Changeset 27360
- Timestamp:
- Mar 19, 2010, 2:32:11 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/magic/remove/src/diffedpixels.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/magic/remove/src/diffedpixels.c
r27348 r27360 1 1 #include "streaksremove.h" 2 2 #include "pmAstrometryWCS.h" 3 4 #define DEBUG_PRINT 1 3 5 4 6 static void addTouchedPixels(streakFiles *sf, psString fileName); … … 125 127 126 128 // put the corners in the desired order (see comments below) 127 128 129 nameCorners(pt); 129 130 psString type; … … 246 247 0-------------- 247 248 A right boundary: line 1_2 y < pt2.y 248 1 line 2_3 y >= pt.y249 1 line 2_3 y >= pt2.y 249 250 ************************** 250 251 … … 311 312 tr = pt[0]; 312 313 } 313 if (tl.y >= tr.y) { 314 // Type 1 (or 3 which is equivalent) 314 int type = 0; 315 int type3 = 0; 316 if (round(tl.x) == round(bl.x)) { 317 type3 = 1; 318 if (tl.y <= tr.y) { 319 type = 1; 320 } else { 321 type = 2; 322 } 323 } else if (tl.y >= tr.y) { 324 type = 1; 325 } else { 326 type = 2; 327 } 328 if (type == 1) { 315 329 pt[0] = bl; 316 330 pt[1] = br; … … 361 375 streaksExit("", PS_EXIT_PROG_ERROR); 362 376 } 377 363 378 // pt2 is below or at the same y as pt3 364 if (pt[2].y > pt[3].y) { 379 // This can happen with some strange shapes. Accept this with type3 380 // since our edge conditions are still satisfied 381 if (!type3 && (pt[2].y > pt[3].y)) { 365 382 fprintf(stderr, "ERROR calculating diff overlap\n"); 366 383 fprintf(stderr, "pt[2].y (%f) > pt[3].y (%f)\n", pt[2].y, pt[3].y);
Note:
See TracChangeset
for help on using the changeset viewer.
