31#ifndef QUANTIZATOROP_H_
32#define QUANTIZATOROP_H_
34#include "../util/Functor.h"
54 "Quantize to n bits. (For integer images)"), mask(0), bitShift(0) {
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;
map_t parameters
Parameters (name -> linked variable), typically linked to member variables of the derived class.
Definition BeanLike.h:313
LogSourc e is the means for a function or any program segment to "connect" to a Log.
Definition Log.h:326
TODO: CopyOP should be quite similar.
Definition QuantizatorOp.h:50