1 #ifndef __fpa__Image__Functors__SimpleDijkstraCost__hxx__
2 #define __fpa__Image__Functors__SimpleDijkstraCost__hxx__
4 // -------------------------------------------------------------------------
5 template< class _TImage, class _TOutput >
6 typename fpa::Image::Functors::SimpleDijkstraCost< _TImage, _TOutput >::
7 TOutput fpa::Image::Functors::SimpleDijkstraCost< _TImage, _TOutput >::
8 Evaluate( const TIndex& a, const TIndex& b ) const
11 dynamic_cast< const _TImage* >( this->m_Image.GetPointer( ) );
12 TOutput coeff = TOutput( 1 );
13 if( this->m_UseImageSpacing )
15 typename _TImage::PointType pa, pb;
16 im->TransformIndexToPhysicalPoint( a, pa );
17 im->TransformIndexToPhysicalPoint( b, pb );
18 coeff = TOutput( pa.EuclideanDistanceTo( pb ) );
21 return( TOutput( im->GetPixel( a ) ) * coeff );
24 // -------------------------------------------------------------------------
25 template< class _TImage, class _TOutput >
26 fpa::Image::Functors::SimpleDijkstraCost< _TImage, _TOutput >::
29 m_UseImageSpacing( false )
33 // -------------------------------------------------------------------------
34 template< class _TImage, class _TOutput >
35 fpa::Image::Functors::SimpleDijkstraCost< _TImage, _TOutput >::
36 ~SimpleDijkstraCost( )
40 #endif // __fpa__Image__Functors__SimpleDijkstraCost__hxx__