19 #ifndef __itkRankHistogram_h
20 #define __itkRankHistogram_h
54 template<
class TInputPixel >
146 for(
typename MapType::iterator it=
m_Map.begin(); it !=
m_Map.end(); it++ )
149 if( count >= target )
162 bool eraseFlag =
false;
164 if ( total < target )
166 typename MapType::iterator searchIt =
m_RankIt;
167 typename MapType::iterator eraseIt;
169 while ( searchIt !=
m_Map.end() )
175 ThisBin = searchIt->second;
179 m_Map.erase(eraseIt);
187 if ( total >= target )
197 typename MapType::iterator searchIt =
m_RankIt;
198 typename MapType::iterator eraseIt;
200 while ( searchIt !=
m_Map.begin() )
202 ThisBin = searchIt->second;
203 unsigned int tbelow = total - ThisBin;
204 if ( tbelow < target )
210 m_Map.erase(eraseIt);
249 typedef typename std::map< TInputPixel, SizeValueType, TCompare >
MapType;
263 template<
class TInputPixel >
301 if( count >= target )
330 itkAssertInDebugAndIgnoreInReleaseMacro( q >= 0 );
331 itkAssertInDebugAndIgnoreInReleaseMacro( q < (
int)
m_Vec.size() );
332 itkAssertInDebugAndIgnoreInReleaseMacro(
m_Entries >= 1 );
333 itkAssertInDebugAndIgnoreInReleaseMacro(
m_Vec[q] > 0 );
362 typedef typename std::vector< SizeValueType >
VecType;
385 class RankHistogram<signed char>:
386 public VectorRankHistogram<signed char>
391 class RankHistogram<bool>:
392 public VectorRankHistogram<bool>