19#ifndef itkRankHistogram_h
20#define itkRankHistogram_h
50template <
typename TInputPixel>
144 for (
typename MapType::iterator it =
m_Map.begin(); it !=
m_Map.end(); ++it)
161 bool eraseFlag =
false;
166 typename MapType::iterator eraseIt;
168 while (searchIt !=
m_Map.end())
174 ThisBin = searchIt->second;
178 m_Map.erase(eraseIt);
191 if (searchIt ==
m_Map.end())
201 typename MapType::iterator eraseIt;
203 while (searchIt !=
m_Map.begin())
205 ThisBin = searchIt->second;
206 unsigned int tbelow = total - ThisBin;
213 m_Map.erase(eraseIt);
258 using MapType =
typename std::map<TInputPixel, SizeValueType, Compare>;
273template <
typename TInputPixel>
345 itkAssertInDebugAndIgnoreInReleaseMacro(q >= 0);
346 itkAssertInDebugAndIgnoreInReleaseMacro(q <
static_cast<int>(
m_Vec.size()));
347 itkAssertInDebugAndIgnoreInReleaseMacro(
m_Entries >= 1);
348 itkAssertInDebugAndIgnoreInReleaseMacro(
m_Vec[q] > 0);
383 using VecType =
typename std::vector<SizeValueType>;
404class RankHistogram<signed char> :
public VectorRankHistogram<signed char>
408class ITK_TEMPLATE_EXPORT RankHistogram<bool> :
public VectorRankHistogram<bool>
std::less< TInputPixel > Compare
TInputPixel GetValue(const TInputPixel &)
MapType::iterator m_RankIt
typename std::map< TInputPixel, SizeValueType, Compare > MapType
TInputPixel GetValueBruteForce()
RankHistogram & operator=(const RankHistogram &hist)
void AddPixel(const TInputPixel &p)
void RemovePixel(const TInputPixel &p)
static bool UseVectorBasedAlgorithm()
static bool UseVectorBasedAlgorithm()
TInputPixel GetValueBruteForce()
typename std::vector< SizeValueType > VecType
void RemovePixel(const TInputPixel &p)
void AddPixel(const TInputPixel &p)
~VectorRankHistogram()=default
std::less< TInputPixel > Compare
TInputPixel GetValue(const TInputPixel &)
Define additional traits for native types such as int or float.
static constexpr T NonpositiveMin()
static constexpr T max(const T &)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType