31 #ifndef IMG_ALG_TRANS_HH
32 #define IMG_ALG_TRANS_HH
39 #define IMG_ALG_TRANSCENDENTALS_BLOCK(FF,NN,SS) \
43 template <typename T, class D> \
44 void VisitState(ImageStateImpl<T,D>& isi) const { \
45 const T* end = isi.Data().GetEnd(); \
46 for(T* it = isi.Data().GetData(); it!=end; ++it) { \
51 void VisitState(ImageStateImpl<Word,D>& isi) const { \
52 const Word* end = isi.Data().GetEnd(); \
53 for(Word* it = isi.Data().GetData(); it!=end; ++it) { \
54 (*it) = static_cast<Word>(SS(static_cast<Real>(*it))); \
57 static String GetAlgorithmName() {return "";} \
59 typedef ImageStateConstModIPAlgorithm<FF> NN;
61 namespace ost {
namespace img {
namespace alg {
76 template <
typename T,
class D>
80 (*it) = std::pow(*it,exp_);
93 #undef IMG_ALG_TRANSCENDENTALS_BLOCK
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
ImageStateConstModIPAlgorithm< PowFnc > Pow
pointer_it< T > end(const std::vector< T > &values)
static String GetAlgorithmName()
void VisitState(ImageStateImpl< T, D > &isi) const
#define IMG_ALG_TRANSCENDENTALS_BLOCK(FF, NN, SS)