35 #ifndef AIMS_HISTOGRAM_EQUALIZEDHISTO_H 36 #define AIMS_HISTOGRAM_EQUALIZEDHISTO_H 64 template <
class T>
inline 84 for(it = thing.
begin(); it != thing.
end(); ++it)
86 tmp = ( int32_t ) *it;
87 ++myHisto( tmp - min );
91 cumul( 0 ) = myHisto( 0 );
96 for ( it1 = myHisto.
begin() + 1; it1 != myHisto.
end(); ++it1, ++it2 )
97 *it2 = *it1 + *( it2 - 1 );
99 for (it2 = cumul.
begin(); it2 != cumul.
end(); ++it2 )
100 *it2 /= (
float) nb_tot;
108 for (it1 = roundcumul.
begin(); it1 != roundcumul.
end(); ++it1 , ++it2)
110 fraction = *it2 *
max;
111 *it1 += int32_t(fraction + 0.5);
119 for ( it3 = res.
begin(); it3 != res.
end(); ++it3, ++it)
120 *it3 = static_cast<T> ( roundcumul( int32_t(*it3) ) - roundcumul(0) );
float min(float x, float y)
float max(float x, float y)
virtual ~Equalizer()
destructor.
Equalizer()
constructor. Does nothing.
AimsData< T > clone() const
AimsData< T > doit(const AimsData< T > &thing)
Classical histogram container class.