1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
6 #ifndef __fpa__Image__Functors__Dijkstra__Invert__h__
7 #define __fpa__Image__Functors__Dijkstra__Invert__h__
10 #include <fpa/Image/Functors/Dijkstra/Function.h>
22 template< class _TInputImage, class _TOutputValue >
24 : public fpa::Image::Functors::Dijkstra::Function< _TInputImage, _TOutputValue >
28 typedef fpa::Image::Functors::Dijkstra::Function< _TInputImage, _TOutputValue > Superclass;
29 typedef itk::SmartPointer< Self > Pointer;
30 typedef itk::SmartPointer< const Self > ConstPointer;
32 typedef typename Superclass::TVertex TVertex;
37 fpa::Image::Functors::Dijkstra::Invert,
38 fpa::Image::Functors::Dijkstra::Function
41 itkGetConstMacro( Alpha, double );
42 itkGetConstMacro( Beta, double );
44 itkSetMacro( Alpha, double );
45 itkSetMacro( Beta, double );
48 virtual _TOutputValue Evaluate(
49 const TVertex& v, const TVertex& p
52 double a = double( this->m_Image->GetPixel( v ) );
53 double d = this->m_Alpha;
54 d += std::pow( double( a ), this->m_Beta );
56 if( std::fabs( d ) > double( 0 ) )
59 ( this->m_Alpha + std::pow( double( a ), this->m_Beta ) );
60 return( _TOutputValue( x ) );
66 m_Alpha( double( 1 ) ),
75 // Purposely not implemented
76 Invert( const Self& other );
77 Self& operator=( const Self& other );
92 #endif // __fpa__Image__Functors__Dijkstra__Invert__h__