Changeset 3610 for trunk/stac/src/stacTransform.c
- Timestamp:
- Mar 31, 2005, 5:07:12 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/stac/src/stacTransform.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/stac/src/stacTransform.c
r3387 r3610 113 113 const psArray *masks, // Masks of input images 114 114 const psImage *region, // Region of interest for transformation 115 const psVector *scales, // Relative scales 116 const psVector *offsets, // Relative offsets 115 117 const stacConfig *config // Configuration 116 118 ) … … 123 125 assert(images->n == maps->n); 124 126 assert(!errors || (images->n == errors->n)); 127 assert(!scales || scales->n == images->n); 128 assert(!offsets || offsets->n == images->n); 129 assert(!scales || scales->type.type == PS_TYPE_F32); 130 assert(!offsets || offsets->type.type == PS_TYPE_F32); 125 131 126 132 // Allocate the output images if required, otherwise check the number … … 170 176 psImage *outImage = (*outputs)->data[n]; // The output image 171 177 psImage *outError = (*outErrors)->data[n]; // The output error image 178 float offset = 0.0; // Relative offset 179 float scale = 1.0; // Relative scale 180 if (offsets) { 181 offset = offsets->data.F32[n]; 182 } 183 if (scales) { 184 scale = scales->data.F32[n]; 185 } 172 186 173 187 #if 0 … … 206 220 detector->y, 207 221 mask, 1, 0.0); 222 223 outImage->data.F32[y][x] = (outImage->data.F32[y][x] - offset) / scale; 224 outImage->data.F32[y][x] = outImage->data.F32[y][x] / SQUARE(scale); 225 208 226 } // Pixels of interest 209 227
Note:
See TracChangeset
for help on using the changeset viewer.
