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>
52 *ptr =
static_cast<T
>(Convert(*ptr));
98 return (val ==
Complex(0.0)? 1.0 : val/std::abs(val))*std::max<Real>(std::min<Real>(std::abs(val),maxval),minval);
virtual NormalizerImpl * Clone() const
virtual Real Convert(Real v) const
virtual Complex BackConvert(Complex v) const
virtual Complex Convert(Complex v) const
virtual Real BackConvert(Real v) const
Abstract normalizer base class.
void VisitState(ImageStateImpl< T, D > &s) const
virtual Complex Convert(Complex v) const =0
virtual Real Convert(Real v) const =0
virtual Complex BackConvert(Complex v) const =0
virtual Real BackConvert(Real v) const =0
static String GetAlgorithmName()
virtual NormalizerImpl * Clone() const =0
Real Clip(Real val) const
Complex ClipMinMax(Complex val, Real minval, Real maxval) const
RangeHandler(Real min, Real max)
Real ClipMinMax(Real val, Real minval, Real maxval) const
Complex Clip(Complex val) const
in-place modifying image state const visitor plus ip algorithm
ValueHolder< T > & Data()
direct access to value holder
VPtr GetData()
return pointer to raw data
#define DLLEXPORT_OST_IMG_BASE
std::complex< Real > Complex
ImageStateConstModIPAlgorithm< NormalizeFnc > NormalizerBase