18 #ifndef itkMorphologyHistogram_h
19 #define itkMorphologyHistogram_h
30 template<
typename TInputPixel,
typename TCompare >
35 using MapType =
typename std::map< TInputPixel, IdentifierType, TCompare >;
61 itkAssertInDebugAndIgnoreInReleaseMacro(!
m_Map.empty());
63 auto mapIt =
m_Map.begin();
64 while ( mapIt !=
m_Map.end() )
66 if ( mapIt->second == 0 )
72 TInputPixel toErase = mapIt->first;
88 itkAssertInDebugAndIgnoreInReleaseMacro(!
m_Map.empty());
89 return m_Map.begin()->first;
92 inline TInputPixel
GetValue(
const TInputPixel &)
112 template<
typename TInputPixel,
typename TCompare >
198 template<
typename TCompare >
204 template<
typename TCompare >
205 class MorphologyHistogram<signed char, TCompare>:
206 public VectorMorphologyHistogram<signed char, TCompare>
210 template<
typename TCompare >
211 class MorphologyHistogram<bool, TCompare>:
212 public VectorMorphologyHistogram<bool, TCompare>
std::vector< IdentifierType > m_Vector
void AddPixel(const TInputPixel &p)
void AddPixel(const TInputPixel &p)
Define numeric traits for std::vector.
TInputPixel GetValue(const TInputPixel &)
VectorMorphologyHistogram()
typename std::map< TInputPixel, IdentifierType, TCompare > MapType
void SetBoundary(const TInputPixel &val)
TInputPixel m_CurrentValue
void SetBoundary(const TInputPixel &val)
MorphologyHistogram()=default
static bool UseVectorBasedAlgorithm()
void RemovePixel(const TInputPixel &p)
TInputPixel GetValue(const TInputPixel &)
static bool UseVectorBasedAlgorithm()
void RemovePixel(const TInputPixel &p)