]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Image/Functors/SimpleNeighborhood.hxx
...
[FrontAlgorithms.git] / lib / fpa / Image / Functors / SimpleNeighborhood.hxx
index a09dab8a130f9cc1c1b2fd9dbf8cde142f368bd7..172425d8c165f6ee0d63a038c40e9406bcbc516b 100644 (file)
@@ -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 )