]> Creatis software - FrontAlgorithms.git/blob - lib/fpa/Image/Functors/RegionGrow/BinaryThreshold.hxx
4184e03958d4ac649f3f25613ec54a6c762d7fe4
[FrontAlgorithms.git] / lib / fpa / Image / Functors / RegionGrow / BinaryThreshold.hxx
1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
5
6 #ifndef __fpa__Image__Functors__RegionGrow__BinaryThreshold__hxx__
7 #define __fpa__Image__Functors__RegionGrow__BinaryThreshold__hxx__
8
9 // -------------------------------------------------------------------------
10 template< class _TPixel >
11 bool fpa::Image::Functors::RegionGrow::BinaryThreshold< _TPixel >::
12 Evaluate( const TPixel& value ) const
13 {
14   return( this->m_Lower < value && value < this->m_Upper );
15 }
16
17 // -------------------------------------------------------------------------
18 template< class _TPixel >
19 fpa::Image::Functors::RegionGrow::BinaryThreshold< _TPixel >::
20 BinaryThreshold( )
21   : Superclass( )
22 {
23   this->m_Upper = std::numeric_limits< TPixel >::max( );
24   if( std::numeric_limits< TPixel >::is_integer )
25     this->m_Lower = std::numeric_limits< TPixel >::min( );
26   else
27     this->m_Lower = -this->m_Upper;
28 }
29
30 // -------------------------------------------------------------------------
31 template< class _TPixel >
32 fpa::Image::Functors::RegionGrow::BinaryThreshold< _TPixel >::
33 ~BinaryThreshold( )
34 {
35 }
36
37 #endif // __fpa__Image__Functors__RegionGrow__BinaryThreshold__hxx__
38
39 // eof - $RCSfile$