Changeset 15363 for trunk/ppstamp/src/ppstampRegion.c
- Timestamp:
- Oct 23, 2007, 11:50:52 AM (19 years ago)
- Location:
- trunk/ppstamp/src
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ppstampRegion.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppstamp/src
- Property svn:ignore
-
old new 6 6 config.h.in 7 7 stamp-h1 8 ppstampErrorCodes.c 9 ppstampErrorCodes.h
-
- Property svn:ignore
-
trunk/ppstamp/src/ppstampRegion.c
r15323 r15363 21 21 // pmReadoutExtent ignores the col0, row0 of the readout 22 22 23 int col0 = image->col0; 24 int row0 = image->row0; 23 int col0 = 0; 24 int row0 = 0; 25 26 #ifdef notdef 27 if (image->parent) { 28 // This is wrong. I'm trying to deal with the strange megacam 'spliced' images 29 // which appear to have inconsistant CELL.X0 and readout.col0 30 col0 = image->col0 - image->parent->col0; 31 row0 = image->row0 - image->parent->row0; 32 } 33 #endif 25 34 26 35 return psRegionAlloc(col0, col0 + image->numCols, … … 44 53 psFree(roExtent); 45 54 } 46 // Unlike pmCellExtent we don't add in cell.x0, cell.y0. The appropriate offset 47 // was included in the roExtent by ppstampReadoutRegion 55 56 bool mdok; // Status of MD lookup 57 int cellX0 = psMetadataLookupS32(&mdok, cell->concepts, "CELL.X0"); // Cell x offset 58 if (!mdok) { 59 psError(PS_ERR_UNKNOWN, true, "Unable to find CELL.X0.\n"); 60 psFree(cellExtent); 61 return NULL; 62 } 63 64 int cellY0 = psMetadataLookupS32(&mdok, cell->concepts, "CELL.Y0"); // Cell y offset 65 if (!mdok) { 66 psError(PS_ERR_UNKNOWN, true, "Unable to find CELL.Y0.\n"); 67 psFree(cellExtent); 68 return NULL; 69 } 70 int xParity = psMetadataLookupS32(NULL, cell->concepts, "CELL.XPARITY"); 71 int yParity = psMetadataLookupS32(NULL, cell->concepts, "CELL.YPARITY"); 72 73 if (xParity >= 0) { 74 cellExtent->x0 += cellX0; 75 cellExtent->x1 += cellX0; 76 } else { 77 float x0 = cellX0 - cellExtent->x1; 78 float x1 = cellX0 - cellExtent->x0; 79 cellExtent->x0 = x0; 80 cellExtent->x1 = x1; 81 } 82 83 if (yParity >= 0) { 84 cellExtent->y0 += cellY0; 85 cellExtent->y1 += cellY0; 86 } else { 87 float y0 = cellY0 - cellExtent->y1; 88 float y1 = cellY0 - cellExtent->y0; 89 cellExtent->y0 = y0; 90 cellExtent->y1 = y1; 91 } 48 92 49 93 return cellExtent;
Note:
See TracChangeset
for help on using the changeset viewer.
