-// -------------------------------------------------------------------------
-template< class I, class O, class A >
-unsigned long fpa::Image::Algorithm< I, O, A >::
-_NumberOfVertices( ) const
-{
- return( this->GetInput( )->GetRequestedRegion( ).GetNumberOfPixels( ) );
-}
-
-// -------------------------------------------------------------------------
-template< class I, class O, class A >
-const typename fpa::Image::Algorithm< I, O, A >::
-TValue& fpa::Image::Algorithm< I, O, A >::
-_VertexValue( const TVertex& v ) const
-{
- return( this->GetInput( )->GetPixel( v ) );
+ TNeighborhoodFunction* neighFunc =
+ dynamic_cast< TNeighborhoodFunction* >(
+ this->GetNeighborhoodFunction( )
+ );
+ if( neighFunc == NULL )
+ itkExceptionMacro( << "NeighborhoodFunction not well defined." );
+ neighFunc->SetImage( this->GetInput( ) );