+// -------------------------------------------------------------------------
+template< class I >
+void fpa::Image::RegionGrowWithMultipleThresholds< I >::
+_Mark( const _TNode& n )
+{
+ this->Superclass::_Mark( n );
+
+ // Check if the histogram's support is enough
+ if( this->m_Histogram.size( ) < 2 )
+ return;
+ typename THistogram::const_reverse_iterator hIt =
+ this->m_Histogram.rbegin( );
+
+ // Get the actual function
+ TFunction* f =
+ dynamic_cast< TFunction* >( this->m_ActualFunction->GetPointer( ) );
+ if( f == NULL )
+ return;
+
+ // Previous pixel count
+ unsigned long prev_aCount = hIt->second;
+ double prev_p = double( prev_aCount ) / double( this->m_TotalCount );
+
+ // Actual pixel count
+ unsigned long aCount = this->m_Marks.size( );
+ double p = double( aCount ) / double( this->m_TotalCount );
+
+ // Loop over, at least, 0.1% of the total number of pixels before
+ // performing stop analysis
+ if( double( 1e-3 ) < p && double( 1e-3 ) < prev_p )
+ {
+ // Does the difference is worthy to be analyzed?
+ if( aCount > hIt->second )