1 #ifndef __fpa__Image__Functors__RegionGrow__BinaryThreshold__hxx__
2 #define __fpa__Image__Functors__RegionGrow__BinaryThreshold__hxx__
6 // -------------------------------------------------------------------------
7 template< class _TImage, class _TOutput >
9 fpa::Image::Functors::RegionGrow::BinaryThreshold< _TImage, _TOutput >::
10 Evaluate( const TIndex& a, const TIndex& b ) const
13 dynamic_cast< const _TImage* >( this->m_Image.GetPointer( ) );
16 TPixel v = im->GetPixel( b );
18 std::cout << a << " " << v << " " << this->m_Lower << " " << this->m_Upper << std::endl;
21 ( this->m_Lower < v && v < this->m_Upper )?
27 return( this->m_OutsideValue );
30 // -------------------------------------------------------------------------
31 template< class _TImage, class _TOutput >
32 fpa::Image::Functors::RegionGrow::BinaryThreshold< _TImage, _TOutput >::
36 this->m_Upper = std::numeric_limits< TPixel >::max( );
37 if( std::numeric_limits< TPixel >::is_integer )
38 this->m_Lower = std::numeric_limits< TPixel >::min( );
40 this->m_Lower = -this->m_Upper;
43 // -------------------------------------------------------------------------
44 template< class _TImage, class _TOutput >
45 fpa::Image::Functors::RegionGrow::BinaryThreshold< _TImage, _TOutput >::
50 #endif // __fpa__Image__Functors__RegionGrow__BinaryThreshold__hxx__