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>
21 * w_{i,j}=\left(\exp\left(\left(\frac{w_{i}-w_{j}}{\beta}\right)^{2}\right)-1\right)^{\alpha}
23 template< class _TInputImage, class _TOutputValue >
25 : public fpa::Image::Functors::Dijkstra::Function< _TInputImage, _TOutputValue >
28 typedef Gaussian Self;
29 typedef fpa::Image::Functors::Dijkstra::Function< _TInputImage, _TOutputValue > Superclass;
30 typedef itk::SmartPointer< Self > Pointer;
31 typedef itk::SmartPointer< const Self > ConstPointer;
33 typedef typename Superclass::TVertex TVertex;
38 fpa::Image::Functors::Dijkstra::Gaussian,
39 fpa::Image::Functors::Dijkstra::Function
42 itkGetConstMacro( Alpha, double );
43 itkSetMacro( Alpha, double );
45 itkGetConstMacro( Beta, double );
46 itkSetMacro( Beta, double );
49 virtual _TOutputValue Evaluate(
50 const TVertex& v, const TVertex& p
53 double d = double( this->m_Image->GetPixel( v ) );
54 d -= double( this->m_Image->GetPixel( p ) );
56 d = std::exp( d * d ) - double( 1 );
57 return( _TOutputValue( std::pow( d, this->m_Alpha ) ) );
63 m_Alpha( double( 1 ) ),
72 // Purposely not implemented
73 Gaussian( const Self& other );
74 Self& operator=( const Self& other );
89 #endif // __fpa__Image__Functors__Dijkstra__Gaussian__h__