18 #ifndef itkAdaptiveEqualizationHistogram_h
19 #define itkAdaptiveEqualizationHistogram_h
21 #include "itksys/hash_map.hxx"
39 template<
class TInputPixel,
class TOutputPixel >
62 typename MapType::iterator it =
m_Map.find( p );
64 itkAssertInDebugAndIgnoreInReleaseMacro( it !=
m_Map.end() );
66 if ( --(it->second) == 0 )
73 TOutputPixel
GetValue(
const TInputPixel &pixel)
82 typename MapType::iterator itMap =
m_Map.begin();
84 while ( itMap !=
m_Map.end() )
93 return (TOutputPixel)( iscale * ( sum + 0.5 ) +
m_Minimum );
118 const RealType s = itk::Math::sgn(u - v);
119 const RealType ad = itk::Math::abs( 2.0 * ( u - v ) );
125 using MapType =
typename itksys::hash_map< TInputPixel,
138 #endif // itkAdaptiveHistogramHistogram_h
void RemovePixel(const TInputPixel &p)
AdaptiveEqualizationHistogram()
void SetKernelSize(RealType kernelSize)
TOutputPixel GetValue(const TInputPixel &pixel)
vcl_size_t m_BoundaryCount
void AddPixel(const TInputPixel &p)
typename itksys::hash_map< TInputPixel, vcl_size_t, StructHashFunction< TInputPixel > > MapType
void SetMinimum(TInputPixel minimum)
void SetAlpha(RealType alpha)
void SetMaximum(TInputPixel maximum)
Generic hash function for an arbitrary struct (or class).
void SetBeta(RealType beta)
RealType CumulativeFunction(RealType u, RealType v)