18#ifndef itkAdaptiveEqualizationHistogram_h
19#define itkAdaptiveEqualizationHistogram_h
21#include <unordered_map>
39template <
class TInputPixel,
class TOutputPixel>
60 auto it =
m_Map.find(p);
62 itkAssertInDebugAndIgnoreInReleaseMacro(it !=
m_Map.end());
64 if (--(it->second) == 0)
80 auto itMap =
m_Map.begin();
82 while (itMap !=
m_Map.end())
84 const RealType v = (
static_cast<double>(itMap->first) -
m_Minimum) / iscale - 0.5;
91 return (TOutputPixel)(iscale * (sum + 0.5) +
m_Minimum);
145 const RealType s = itk::Math::sgn(u - v);
152 using MapType =
typename std::unordered_map<TInputPixel, size_t, StructHashFunction<TInputPixel>>;
AdaptiveEqualizationHistogram()=default
RealType CumulativeFunction(RealType u, RealType v)
void SetMinimum(TInputPixel minimum)
void SetAlpha(RealType alpha)
void RemovePixel(const TInputPixel &p)
void SetMaximum(TInputPixel maximum)
TOutputPixel GetValue(const TInputPixel &pixel)
typename std::unordered_map< TInputPixel, vcl_size_t, StructHashFunction< TInputPixel > > MapType
vcl_size_t m_BoundaryCount
void SetKernelSize(RealType kernelSize)
void AddPixel(const TInputPixel &p)
void SetBeta(RealType beta)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....