1 #ifndef __fpa__Image__Functors__RegionGrow__BinaryThreshold__hxx__
2 #define __fpa__Image__Functors__RegionGrow__BinaryThreshold__hxx__
6 // -------------------------------------------------------------------------
7 template< class _TImage >
8 bool fpa::Image::Functors::RegionGrow::BinaryThreshold< _TImage >::
9 Evaluate( const TIndex& a, const TIndex& b ) const
12 dynamic_cast< const _TImage* >( this->m_Image.GetPointer( ) );
15 TPixel v = im->GetPixel( b );
16 return( this->m_Lower <= v && v <= this->m_Upper );
22 // -------------------------------------------------------------------------
23 template< class _TImage >
24 fpa::Image::Functors::RegionGrow::BinaryThreshold< _TImage >::
28 this->m_Upper = std::numeric_limits< TPixel >::max( );
29 if( std::numeric_limits< TPixel >::is_integer )
30 this->m_Lower = std::numeric_limits< TPixel >::min( );
32 this->m_Lower = -this->m_Upper;
35 // -------------------------------------------------------------------------
36 template< class _TImage >
37 fpa::Image::Functors::RegionGrow::BinaryThreshold< _TImage >::
42 #endif // __fpa__Image__Functors__RegionGrow__BinaryThreshold__hxx__