#ifndef __fpa__Image__Functors__RegionGrow__BinaryThreshold__hxx__ #define __fpa__Image__Functors__RegionGrow__BinaryThreshold__hxx__ #include // ------------------------------------------------------------------------- template< class _TImage > bool fpa::Image::Functors::RegionGrow::BinaryThreshold< _TImage >:: Evaluate( const TIndex& a, const TIndex& b ) const { const _TImage* im = dynamic_cast< const _TImage* >( this->m_Image.GetPointer( ) ); if( im != NULL ) { TPixel v = im->GetPixel( b ); return( this->m_Lower <= v && v <= this->m_Upper ); } else return( false ); } // ------------------------------------------------------------------------- template< class _TImage > fpa::Image::Functors::RegionGrow::BinaryThreshold< _TImage >:: BinaryThreshold( ) : Superclass( ) { this->m_Upper = std::numeric_limits< TPixel >::max( ); if( std::numeric_limits< TPixel >::is_integer ) this->m_Lower = std::numeric_limits< TPixel >::min( ); else this->m_Lower = -this->m_Upper; } // ------------------------------------------------------------------------- template< class _TImage > fpa::Image::Functors::RegionGrow::BinaryThreshold< _TImage >:: ~BinaryThreshold( ) { } #endif // __fpa__Image__Functors__RegionGrow__BinaryThreshold__hxx__ // eof - $RCSfile$