18 #ifndef itkMorphologyHistogram_h
19 #define itkMorphologyHistogram_h
30 template<
typename TInputPixel,
typename TCompare >
35 typedef typename std::map< TInputPixel, IdentifierType, TCompare >
MapType;
61 itkAssertInDebugAndIgnoreInReleaseMacro(!
m_Map.empty());
63 typename MapType::iterator 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::map< TInputPixel, IdentifierType, TCompare > MapType
std::vector< IdentifierType > m_Vector
void AddPixel(const TInputPixel &p)
void AddPixel(const TInputPixel &p)
TInputPixel GetValue(const TInputPixel &)
VectorMorphologyHistogram()
void SetBoundary(const TInputPixel &val)
TInputPixel m_CurrentValue
void SetBoundary(const TInputPixel &val)
static bool UseVectorBasedAlgorithm()
void RemovePixel(const TInputPixel &p)
TInputPixel GetValue(const TInputPixel &)
static T NonpositiveMin()
Define additional traits for native types such as int or float.
static bool UseVectorBasedAlgorithm()
void RemovePixel(const TInputPixel &p)