#ifndef __fpa__Image__FastMarching__hxx__ #define __fpa__Image__FastMarching__hxx__ #include // ------------------------------------------------------------------------- template< class _TInputImage, class _TOutputImage > fpa::Image::FastMarching< _TInputImage, _TOutputImage >:: FastMarching( ) : Superclass( ) { typedef fpa::Image::Functors::VertexCost< _TInputImage, TOutput > _TCost; typename _TCost::Pointer cost = _TCost::New( ); this->SetVertexFunction( cost ); this->m_InitResult = std::numeric_limits< TOutput >::max( ); } // ------------------------------------------------------------------------- template< class _TInputImage, class _TOutputImage > fpa::Image::FastMarching< _TInputImage, _TOutputImage >:: ~FastMarching( ) { } // ------------------------------------------------------------------------- template< class _TInputImage, class _TOutputImage > typename fpa::Image::FastMarching< _TInputImage, _TOutputImage >:: TFastMarchingNeighborhood fpa::Image::FastMarching< _TInputImage, _TOutputImage >:: _FastMarchingNeighbors( const TVertex& v ) const { TFastMarchingNeighborhood neighs; typename _TInputImage::SpacingType spac = this->GetInput( )->GetSpacing( ); for( unsigned int d = 0; d < _TInputImage::ImageDimension; ++d ) { for( int i = -1; i <= 1; i += 2 ) { TVertex n = v; n[ d ] += i; neighs.push_back( TFastMarchingNeighbor( n, spac[ d ] ) ); } // rof } // rof return( neighs ); } #endif // __fpa__Image__FastMarching__hxx__ // eof - $RCSfile$