19 #ifndef __itkRankHistogram_h
20 #define __itkRankHistogram_h
54 template<
class TInputPixel >
143 for(
typename MapType::iterator it=
m_Map.begin(); it !=
m_Map.end(); it++ )
146 if( count >= target )
159 bool eraseFlag =
false;
161 if ( total < target )
163 typename MapType::iterator searchIt =
m_RankIt;
164 typename MapType::iterator eraseIt;
166 while ( searchIt !=
m_Map.end() )
172 ThisBin = searchIt->second;
176 m_Map.erase(eraseIt);
184 if ( total >= target )
194 typename MapType::iterator searchIt =
m_RankIt;
195 typename MapType::iterator eraseIt;
197 while ( searchIt !=
m_Map.begin() )
199 ThisBin = searchIt->second;
200 unsigned int tbelow = total - ThisBin;
201 if ( tbelow < target )
207 m_Map.erase(eraseIt);
246 typedef typename std::map< TInputPixel, SizeValueType, TCompare >
MapType;
260 template<
class TInputPixel >
298 if( count >= target )
327 itkAssertInDebugAndIgnoreInReleaseMacro( q >= 0 );
328 itkAssertInDebugAndIgnoreInReleaseMacro( q < (
int)
m_Vec.size() );
329 itkAssertInDebugAndIgnoreInReleaseMacro(
m_Entries >= 1 );
330 itkAssertInDebugAndIgnoreInReleaseMacro(
m_Vec[q] > 0 );
359 typedef typename std::vector< SizeValueType >
VecType;
382 class RankHistogram<signed char>:
383 public VectorRankHistogram<signed char>
388 class RankHistogram<bool>:
389 public VectorRankHistogram<bool>