Template Function lsst::ip::isr::applyLookupTable¶
Function Documentation¶
- 
template<typename 
PixelT>
intlsst::ip::isr::applyLookupTable(afw::image::Image<PixelT> &image, ndarray::Array<PixelT, 1, 1> const &table, PixelT indOffset)¶ Add the values in a lookup table to an image, e.g. for non-linearity correction
The algorithm is as follows: numOutOfRange = 0 For each i,j of the image: lookupInd = int(indOffset + image[i,j]) if lookupInd not in range [0, table.size() - 1]: set lookupInd to nearest edge and increment numOutOfRange image[i,j] += table[lookupInd] return numOutOfRange
- Return
 the number of pixels whose values were out of range
- Parameters
 [inout] image: image to which to add the values; modified in place[in] table: lookup table[in] indOffset: scalar added to image value before truncating to lookup column