]> Creatis software - cpPlugins.git/blob - lib/ivq/ITK/ExtractLabelFunction.hxx
...
[cpPlugins.git] / lib / ivq / ITK / ExtractLabelFunction.hxx
1 // =======================================================================
2 // @author: Leonardo Florez-Valencia
3 // @email: florez-l@javeriana.edu.co
4 // =======================================================================
5 #ifndef __ivq__ITK__ExtractLabelFunction__hxx__
6 #define __ivq__ITK__ExtractLabelFunction__hxx__
7
8 #include <limits>
9
10 // -------------------------------------------------------------------------
11 template< class _TIn, class _TOut >
12 _TOut ivq::ITK::ExtractLabelFunction< _TIn, _TOut >::
13 Evaluate( const _TIn& in ) const
14 {
15   return( ( in == this->m_Label )? this->m_InsideValue: this->m_OutsideValue );
16 }
17
18 // -------------------------------------------------------------------------
19 template< class _TIn, class _TOut >
20 ivq::ITK::ExtractLabelFunction< _TIn, _TOut >::
21 ExtractLabelFunction( )
22   : Superclass( ),
23     m_Label( _TIn( 0 ) ),
24     m_InsideValue( std::numeric_limits< _TOut >::max( ) ),
25     m_OutsideValue( _TOut( 0 ) )
26 {
27 }
28
29 // -------------------------------------------------------------------------
30 template< class _TIn, class _TOut >
31 ivq::ITK::ExtractLabelFunction< _TIn, _TOut >::
32 ~ExtractLabelFunction( )
33 {
34 }
35
36 #endif // __ivq__ITK__ExtractLabelFunction__hxx__
37
38 // eof - $RCSfile$