54 "Quantize to n bits. (For integer images)"), mask(0), bitShift(0) {
55 parameters.link(
"bits", this->bits = bits);
61 int operator()(
int s)
const {
69 double operator()(
double s)
const {
71 return (1/255.0)*
static_cast<double>(operator ()(
static_cast<int>(255.0*s)));
83 for (
unsigned int i = 0; i < bits; i++)
84 mask = (mask << 1) | 1;
87 mask = mask << (1*8 - bits);
122 mutable long int mask;
124 mutable int bitShift;