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 >
124 m_CurrentValue = m_InitValue;
130 m_CurrentValue = m_InitValue;
149 if ( m_Compare(p, m_CurrentValue) )
159 && m_CurrentValue != m_InitValue )
161 m_CurrentValue += m_Direction;
167 return m_CurrentValue;
198 template<
typename TCompare >
204 template<
typename TCompare >
210 template<
typename TCompare >
std::map< TInputPixel, IdentifierType, TCompare > MapType
std::vector< IdentifierType > m_Vector
void AddPixel(const TInputPixel &p)
void AddPixel(const TInputPixel &p)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
TInputPixel GetValue(const TInputPixel &)
VectorMorphologyHistogram()
static ITK_CONSTEXPR_FUNC T max(const T &)
void SetBoundary(const TInputPixel &val)
TInputPixel m_CurrentValue
void SetBoundary(const TInputPixel &val)
static bool UseVectorBasedAlgorithm()
static ITK_CONSTEXPR_FUNC T NonpositiveMin()
void RemovePixel(const TInputPixel &p)
TInputPixel GetValue(const TInputPixel &)
Define additional traits for native types such as int or float.
static bool UseVectorBasedAlgorithm()
void RemovePixel(const TInputPixel &p)