1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
6 #ifndef __fpa__Image__Functors__Dijkstra__Gaussian__h__
7 #define __fpa__Image__Functors__Dijkstra__Gaussian__h__
10 #include <fpa/Image/Functors/Dijkstra/Function.h>
22 template< class _TInputImage, class _TOutputValue >
24 : public fpa::Image::Functors::Dijkstra::Function< _TInputImage, _TOutputValue >
27 typedef Gaussian Self;
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::Gaussian,
38 fpa::Image::Functors::Dijkstra::Function
42 double GetAlpha( ) const
44 return( double( 1 ) - this->m_Alpha );
46 double GetBeta( ) const
48 return( std::sqrt( this->m_Beta ) );
50 void SetAlpha( const double& v )
52 this->m_Alpha = double( 1 ) - v;
55 void SetBeta( const double& v )
61 virtual _TOutputValue Evaluate(
62 const TVertex& v, const TVertex& p
65 double d = double( this->m_Image->GetPixel( v ) );
66 d -= double( this->m_Image->GetPixel( p ) );
67 d = ( d * d ) / this->m_Beta;
69 _TOutputValue( double( 1 ) - ( this->m_Alpha * std::exp( -d ) ) )
76 m_Alpha( double( 1 ) ),
85 // Purposely not implemented
86 Gaussian( const Self& other );
87 Self& operator=( const Self& other );
102 #endif // __fpa__Image__Functors__Dijkstra__Gaussian__h__