27 #ifndef IMG_NORMALIZER_IMPL_H
28 #define IMG_NORMALIZER_IMPL_H
30 #include <boost/shared_ptr.hpp>
36 namespace ost {
namespace img {
48 template <
typename T,
class D>
51 for(T* ptr = s.Data().GetData(); ptr<s.Data().GetEnd(); ++ptr) {
52 *ptr =
static_cast<T
>(Convert(*ptr));
57 virtual Real BackConvert(
Real v)
const = 0;
59 virtual Real Convert(
Real v)
const = 0;
98 return (val ==
Complex(0.0)? 1.0 : val/std::abs(val))*std::max<Real>(std::min<Real>(std::abs(val),maxval),minval);
Complex ClipMinMax(Complex val, Real minval, Real maxval) const
std::complex< Real > Complex
RangeHandler(Real min, Real max)
virtual Real BackConvert(Real v) const
Real ClipMinMax(Real val, Real minval, Real maxval) const
Real Clip(Real val) const
Abstract normalizer base class.
virtual NormalizerImpl * Clone() const =0
virtual Real Convert(Real v) const
virtual Complex BackConvert(Complex v) const
Complex Clip(Complex val) const
static String GetAlgorithmName()
virtual Complex Convert(Complex v) const
virtual NormalizerImpl * Clone() const
void VisitState(ImageStateImpl< T, D > &s) const
#define DLLEXPORT_OST_IMG_BASE
ImageStateConstModIPAlgorithm< NormalizeFnc > NormalizerBase