34template<
typename PixelT>
37 ndarray::Array<PixelT, 1, 1>
const &table,
40 if (table.size() == 0u) {
43 "Lookup table has zero size."
46 int numOutOfRange = 0;
47 int const maxLookupCol = table.size() - 1;
48 for (
int col = 0, imHeight =
image.getHeight();
col < imHeight; ++
col) {
50 int lookupCol = indOffset + *imPtr;
54 }
else if (lookupCol > maxLookupCol) {
55 lookupCol = maxLookupCol;
58 *imPtr += table[lookupCol];
64#define INSTANTIATE(T) \
65 template int applyLookupTable<T>(afw::image::Image<T> &, ndarray::Array<T, 1, 1> const &, T);
#define LSST_EXCEPT(type,...)
int 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.
Remove all non-astronomical counts from the Chunk Exposure's pixels.