34 template<
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;
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);
int getHeight() const
Return the number of rows in the image.
Reports attempts to exceed implementation-defined length limits for some classes. ...
x_iterator row_begin(int y) const
Return an x_iterator to the start of the y'th row.
A base class for image defects.
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
x_iterator row_end(int y) const
Return an x_iterator to the end of the y'th row.
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects...
A class to represent a 2-dimensional array of pixels.
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.