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();
83 const RealType u = ( (double)pixel -
m_Minimum ) / iscale - 0.5;
84 while ( itMap !=
m_Map.end() )
86 const RealType v = ( (double)itMap->first -
m_Minimum ) / iscale - 0.5;
93 return (TOutputPixel)( iscale * ( sum + 0.5 ) +
m_Minimum );
121 return 0.5 * s * std::pow(ad, m_Alpha) - m_Beta * 0.5 * s * ad + m_Beta * u;
125 typedef 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
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
void AddPixel(const TInputPixel &p)
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)
itksys::hash_map< TInputPixel, vcl_size_t, StructHashFunction< TInputPixel > > MapType