Changeset 13299
- Timestamp:
- May 7, 2007, 11:21:17 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/camera/pmFPAMosaic.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAMosaic.c
r13298 r13299 1105 1105 1106 1106 // If the cells contain the headers, we need to apply the WCS terms from (one of?) the cells 1107 int xParityTarget = psMetadataLookupS32(NULL, target->concepts, "CHIP.XPARITY") * 1108 psMetadataLookupS32(NULL, targetCell->concepts, "CELL.XPARITY"); // Target parity in x 1109 if (xParityTarget != -1 && xParityTarget != 1) { 1110 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "CHIP.XPARITY or CELL.XPARITY is not set for target."); 1111 return false; 1112 } 1113 int yParityTarget = psMetadataLookupS32(NULL, target->concepts, "CHIP.YPARITY") * 1114 psMetadataLookupS32(NULL, targetCell->concepts, "CELL.YPARITY"); // Target parity in y 1115 if (yParityTarget != -1 && yParityTarget != 1) { 1116 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "CHIP.YPARITY or CELL.YPARITY is not set for target."); 1117 return false; 1118 } 1119 1107 1120 for (int i = 0; i < source->cells->n; i++) { 1108 1121 pmCell *cell = source->cells->data[i]; … … 1122 1135 return false; 1123 1136 } 1124 int xParityCell = psMetadataLookupS32(NULL, cell->concepts, "CELL.XPARITY"); // Cell parity in x 1125 if (xParityCell != -1 && xParityCell != 1) { 1126 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "CELL.XPARITY is not set."); 1127 return false; 1128 } 1129 int xParityChip = psMetadataLookupS32(NULL, chip->concepts, "CHIP.XPARITY"); // Chip parity in x 1130 if (xParityChip != -1 && xParityChip != 1) { 1131 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "CHIP.XPARITY is not set."); 1132 return false; 1133 } 1134 bool xFlip = (xParityCell == xParityChip ? false : true); // Flip the x sense of the WCS? 1137 int xParitySource = psMetadataLookupS32(NULL, cell->concepts, "CELL.XPARITY") * 1138 psMetadataLookupS32(NULL, source->concepts, "CHIP.XPARITY"); // Source parity in x 1139 if (xParitySource != -1 && xParitySource != 1) { 1140 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "CHIP.XPARITY or CELL.XPARITY is not set for source."); 1141 return false; 1142 } 1143 bool xFlip = (xParitySource == xParityTarget ? false : true); // Flip the x sense of the WCS? 1135 1144 int x0Cell = psMetadataLookupS32(NULL, cell->concepts, "CELL.X0"); // Cell offset in x 1136 1145 … … 1150 1159 return false; 1151 1160 } 1152 int yParityCell = psMetadataLookupS32(NULL, cell->concepts, "CELL.YPARITY"); // Cell parity in y 1153 if (yParityCell != -1 && yParityCell != 1) { 1154 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "CELL.YPARITY is not set."); 1155 return false; 1156 } 1157 int yParityChip = psMetadataLookupS32(NULL, chip->concepts, "CHIP.YPARITY"); // Chip parity in y 1158 if (yParityChip != -1 && yParityChip != 1) { 1159 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "CHIP.YPARITY is not set."); 1160 return false; 1161 } 1162 bool yFlip = (yParityCell == yParityChip ? false : true); // Flip the y sense of the WCS? 1161 int yParitySource = psMetadataLookupS32(NULL, cell->concepts, "CELL.YPARITY") * 1162 psMetadataLookupS32(NULL, cell->parent->concepts, "CHIP.YPARITY"); // Source parity in y 1163 if (yParitySource != -1 && yParitySource != 1) { 1164 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "CHIP.YPARITY or CELL.YPARITY is not set for source."); 1165 return false; 1166 } 1167 bool yFlip = (yParitySource == yParityTarget ? false : true); // Flip the y sense of the WCS? 1163 1168 int y0Cell = psMetadataLookupS32(NULL, cell->concepts, "CELL.Y0"); // Cell offset in y 1164 1169
Note:
See TracChangeset
for help on using the changeset viewer.
