35 #ifndef AIMS_HISTOGRAM_SIMPLEHISTO_H 36 #define AIMS_HISTOGRAM_SIMPLEHISTO_H 68 void rebin(
int size );
81 template<
class T >
inline 100 for ( x=thing.
dimX(); x--; it++ )
107 template<
class T >
inline 114 template<
class T >
inline 118 rebin( end - beg, beg, end );
122 template<
class T >
inline 126 int i,
sum, length = end - beg;
130 int coef = (int)ceil( (
double)length / (double)size );
136 for ( it2=res.
begin(); it2!=res.
end(); )
140 for ( i = coef; i-- && it != end; )
151 for ( it2 = res.
begin(); *it2 == 0 && it2 != res.
end(); it2++ )
154 for ( ; it2 != res.
end(); it2++ )
173 float div = maxh - minh;
175 if ( ( div < (
float)size ) && ( div > 1.0f ) )
195 for ( x=thing.
dimX(); x--; it++ )
197 int p = (int)( (
float) size * ( *it - minh ) / div );
221 double div = maxh - minh;
223 if ( ( div < (
float)size ) && ( div > 1.0f ) )
243 for ( x=thing.
dimX(); x--; it++ )
244 dest[ (
int)( (double)size * ( *it - minh ) / div ) ]++;
int oLineBetweenSlice() const
int oPointBetweenLine() const
int _nPoints
total number of points
DataTypeTraits< T >::LongType sum(const Volume< T > &vol)
int _minValid
minimum used value
int _maxValid
maximum used value
virtual ~SimpleHistogram()
destructor.
Classical histogram container class.
SimpleHistogram(const SimpleHistogram< T > &other)
copy constructor.
SimpleHistogram()
constructor. Does nothing.
Base class of histogram container class.
AimsData< int32_t > _data
histogram datas
void doit(const AimsData< T > &thing)
classical histogram computation function.
void rebin(int size)
rebinning to a specific result vector size.
int oSliceBetweenVolume() const