X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2Ffpa%2FImage%2FFunctors%2FSimpleNeighborhood.hxx;h=172425d8c165f6ee0d63a038c40e9406bcbc516b;hb=40fb0405cfef444001429f8ba49c407ce9168a94;hp=a09dab8a130f9cc1c1b2fd9dbf8cde142f368bd7;hpb=cf298be2de026712c5ab3487978e3a6954a809cd;p=FrontAlgorithms.git diff --git a/lib/fpa/Image/Functors/SimpleNeighborhood.hxx b/lib/fpa/Image/Functors/SimpleNeighborhood.hxx index a09dab8..172425d 100644 --- a/lib/fpa/Image/Functors/SimpleNeighborhood.hxx +++ b/lib/fpa/Image/Functors/SimpleNeighborhood.hxx @@ -2,9 +2,9 @@ #define __fpa__Image__Functors__SimpleNeighborhood__hxx__ // ------------------------------------------------------------------------- -template< class _TImage > -typename fpa::Image::Functors::SimpleNeighborhood< _TImage >:: -TOutput fpa::Image::Functors::SimpleNeighborhood< _TImage >:: +template< unsigned int _VDim > +typename fpa::Image::Functors::SimpleNeighborhood< _VDim >:: +TOutput fpa::Image::Functors::SimpleNeighborhood< _VDim >:: Evaluate( const TIndex& center ) const { if( this->m_Offsets.size( ) == 0 ) @@ -17,7 +17,7 @@ Evaluate( const TIndex& center ) const } // fi TOutput res; - typename _TImage::RegionType reg = this->m_Image->GetRequestedRegion( ); + typename TImage::RegionType reg = this->m_Image->GetRequestedRegion( ); for( int i = 0; i < this->m_Offsets.size( ); ++i ) { TIndex idx = center + this->m_Offsets[ i ]; @@ -29,8 +29,8 @@ Evaluate( const TIndex& center ) const } // ------------------------------------------------------------------------- -template< class _TImage > -fpa::Image::Functors::SimpleNeighborhood< _TImage >:: +template< unsigned int _VDim > +fpa::Image::Functors::SimpleNeighborhood< _VDim >:: SimpleNeighborhood( ) : Superclass( ), m_Order( 1 ) @@ -38,18 +38,18 @@ SimpleNeighborhood( ) } // ------------------------------------------------------------------------- -template< class _TImage > - fpa::Image::Functors::SimpleNeighborhood< _TImage >:: +template< unsigned int _VDim > + fpa::Image::Functors::SimpleNeighborhood< _VDim >:: ~SimpleNeighborhood( ) { } // ------------------------------------------------------------------------- -template< class _TImage > -void fpa::Image::Functors::SimpleNeighborhood< _TImage >:: +template< unsigned int _VDim > +void fpa::Image::Functors::SimpleNeighborhood< _VDim >:: _1stCombination( ) const { - for( int d = 0; d < _TImage::ImageDimension; ++d ) + for( int d = 0; d < TImage::ImageDimension; ++d ) { typename TIndex::OffsetType off; off.Fill( 0 ); @@ -64,8 +64,8 @@ _1stCombination( ) const } // ------------------------------------------------------------------------- -template< class _TImage > -void fpa::Image::Functors::SimpleNeighborhood< _TImage >:: +template< unsigned int _VDim > +void fpa::Image::Functors::SimpleNeighborhood< _VDim >:: _2ndCombination( ) const { std::vector< std::vector< std::vector< int > > > M; @@ -75,7 +75,7 @@ _2ndCombination( ) const base.push_back( -1 ); base.push_back( 0 ); base.push_back( 1 ); - int dim = _TImage::ImageDimension; + int dim = TImage::ImageDimension; M.push_back( std::vector< std::vector< int > >( ) ); for( int j = 0; j < base.size( ); ++j )