18#ifndef itkMorphologyHistogram_h
19#define itkMorphologyHistogram_h
30template <
typename TInputPixel,
typename TCompare>
34 using MapType =
typename std::map<TInputPixel, IdentifierType, TCompare>;
65 itkAssertInDebugAndIgnoreInReleaseMacro(!
m_Map.empty());
67 auto mapIt =
m_Map.begin();
68 while (mapIt !=
m_Map.end())
70 if (mapIt->second == 0)
76 TInputPixel toErase = mapIt->first;
92 itkAssertInDebugAndIgnoreInReleaseMacro(!
m_Map.empty());
93 return m_Map.begin()->first;
118template <
typename TInputPixel,
typename TCompare>
211template <
typename TCompare>
215template <
typename TCompare>
216class MorphologyHistogram<signed char, TCompare> :
public VectorMorphologyHistogram<signed char, TCompare>
219template <
typename TCompare>
220class MorphologyHistogram<bool, TCompare> :
public VectorMorphologyHistogram<bool, TCompare>
static bool UseVectorBasedAlgorithm()
void SetBoundary(const TInputPixel &val)
void RemovePixel(const TInputPixel &p)
TInputPixel GetValue(const TInputPixel &)
typename std::map< TInputPixel, IdentifierType, TCompare > MapType
MorphologyHistogram()=default
void AddPixel(const TInputPixel &p)
static bool UseVectorBasedAlgorithm()
VectorMorphologyHistogram()
std::vector< IdentifierType > m_Vector
TInputPixel m_CurrentValue
void AddPixel(const TInputPixel &p)
void RemovePixel(const TInputPixel &p)
void SetBoundary(const TInputPixel &val)
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....