1 #ifndef __fpa__Image__FastMarching__hxx__
2 #define __fpa__Image__FastMarching__hxx__
4 #include <fpa/Image/Functors/VertexCost.h>
6 // -------------------------------------------------------------------------
7 template< class _TInputImage, class _TOutputImage >
8 fpa::Image::FastMarching< _TInputImage, _TOutputImage >::
12 typedef fpa::Image::Functors::VertexCost< _TInputImage, TOutput > _TCost;
13 typename _TCost::Pointer cost = _TCost::New( );
14 this->SetVertexFunction( cost );
15 this->m_InitResult = std::numeric_limits< TOutput >::max( );
18 // -------------------------------------------------------------------------
19 template< class _TInputImage, class _TOutputImage >
20 fpa::Image::FastMarching< _TInputImage, _TOutputImage >::
25 // -------------------------------------------------------------------------
26 template< class _TInputImage, class _TOutputImage >
27 typename fpa::Image::FastMarching< _TInputImage, _TOutputImage >::
28 TFastMarchingNeighborhood
29 fpa::Image::FastMarching< _TInputImage, _TOutputImage >::
30 _FastMarchingNeighbors( const TVertex& v ) const
32 TFastMarchingNeighborhood neighs;
33 typename _TInputImage::SpacingType spac = this->GetInput( )->GetSpacing( );
34 for( unsigned int d = 0; d < _TInputImage::ImageDimension; ++d )
36 for( int i = -1; i <= 1; i += 2 )
40 neighs.push_back( TFastMarchingNeighbor( n, spac[ d ] ) );
48 #endif // __fpa__Image__FastMarching__hxx__