1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
6 #ifndef __fpa__Image__Functors__GaussianWeight__h__
7 #define __fpa__Image__Functors__GaussianWeight__h__
9 #include <fpa/Image/Functors/VertexParentBase.h>
20 template< class _TInputImage, class _TOutputValue >
22 : public fpa::Image::Functors::VertexParentBase< _TInputImage, _TOutputValue >
25 typedef _TInputImage TInputImage;
26 typedef _TOutputValue TOutputValue;
27 typedef GaussianWeight Self;
28 typedef itk::SmartPointer< Self > Pointer;
29 typedef itk::SmartPointer< const Self > ConstPointer;
30 typedef fpa::Image::Functors::VertexParentBase< TInputImage, TOutputValue > Superclass;
32 typedef typename Superclass::TVertex TVertex;
37 fpa::Image::Functors::GaussianWeight,
38 fpa::Image::Functors::VertexParentBase
41 itkGetConstMacro( Beta, double );
42 itkSetMacro( Beta, double );
45 virtual TOutputValue Evaluate(
46 const TVertex& a, const TVertex& p
49 double va = double( this->m_Image->GetPixel( a ) );
50 double vp = double( this->m_Image->GetPixel( p ) );
52 return( TOutputValue( std::exp( -d * d * this->m_Beta ) ) );
60 virtual ~GaussianWeight( ) { }
63 GaussianWeight( const Self& other );
64 Self& operator=( const Self& other );
76 #endif // __fpa__Image__Functors__GaussianWeight__h__