ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkForwardDifferenceOperator.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkForwardDifferenceOperator_h
00019 #define __itkForwardDifferenceOperator_h
00020 
00021 #include "itkNeighborhoodOperator.h"
00022 
00023 namespace itk
00024 {
00043 template< class TPixel, unsigned int VDimension = 2,
00044           class TAllocator = NeighborhoodAllocator< TPixel > >
00045 class ITK_EXPORT ForwardDifferenceOperator:
00046   public NeighborhoodOperator< TPixel, VDimension, TAllocator >
00047 {
00048 public:
00049 
00051   typedef ForwardDifferenceOperator                              Self;
00052   typedef NeighborhoodOperator< TPixel, VDimension, TAllocator > Superclass;
00053 
00054   typedef typename Superclass::PixelType PixelType;
00055 
00057   ForwardDifferenceOperator() {}
00058 
00060   ForwardDifferenceOperator(const Self & other):
00061     NeighborhoodOperator< TPixel, VDimension, TAllocator >(other) {}
00062 
00064   Self & operator=(const Self & other)
00065   {
00066     Superclass::operator=(other);
00067     return *this;
00068   }
00070 
00071 protected:
00073   typedef typename Superclass::CoefficientVector CoefficientVector;
00074 
00076   CoefficientVector GenerateCoefficients();
00077 
00079   void Fill(const CoefficientVector & coeff)
00080 
00081   { this->FillCenteredDirectional(coeff); }
00082 };
00083 } // namespace itk
00084 
00085 #ifndef ITK_MANUAL_INSTANTIATION
00086 #include "itkForwardDifferenceOperator.hxx"
00087 #endif
00088 
00089 #endif
00090