ITK  4.0.0
Insight Segmentation and Registration Toolkit
itkZeroFluxNeumannBoundaryCondition.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 __itkZeroFluxNeumannBoundaryCondition_h
00019 #define __itkZeroFluxNeumannBoundaryCondition_h
00020 #include "itkImageBoundaryCondition.h"
00021 
00022 namespace itk
00023 {
00057 template< class TInputImage, class TOutputImage = TInputImage >
00058 class ITK_EXPORT ZeroFluxNeumannBoundaryCondition:
00059     public ImageBoundaryCondition< TInputImage, TOutputImage >
00060 {
00061 public:
00063   typedef ZeroFluxNeumannBoundaryCondition                    Self;
00064   typedef ImageBoundaryCondition< TInputImage, TOutputImage > Superclass;
00065 
00067   typedef typename Superclass::PixelType        PixelType;
00068   typedef typename Superclass::PixelPointerType PixelPointerType;
00069   typedef typename Superclass::OutputPixelType  OutputPixelType;
00070   typedef typename Superclass::RegionType       RegionType;
00071   typedef typename Superclass::IndexType        IndexType;
00072   typedef typename Superclass::SizeType         SizeType;
00073   typedef typename Superclass::OffsetType       OffsetType;
00074   typedef typename Superclass::NeighborhoodType NeighborhoodType;
00075 
00076   typedef typename Superclass::NeighborhoodAccessorFunctorType
00077   NeighborhoodAccessorFunctorType;
00078 
00080   itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension);
00081 
00083   ZeroFluxNeumannBoundaryCondition() {}
00084 
00086   virtual const char * GetNameOfClass() const
00087   {
00088     return "itkZeroFluxNeumannBoundaryCondition";
00089   }
00090 
00093   virtual OutputPixelType operator()(const OffsetType & point_index,
00094                                      const OffsetType & boundary_offset,
00095                                      const NeighborhoodType *data) const;
00096 
00099   virtual OutputPixelType operator()(
00100     const OffsetType & point_index,
00101     const OffsetType & boundary_offset,
00102     const NeighborhoodType *data,
00103     const NeighborhoodAccessorFunctorType & neighborhoodAccessorFunctor) const;
00104 
00116   virtual RegionType GetInputRequestedRegion( const RegionType & inputLargestPossibleRegion,
00117                                               const RegionType & outputRequestedRegion ) const;
00118 
00126   OutputPixelType GetPixel( const IndexType & index, const TInputImage * image ) const;
00127 
00128 };
00129 } // end namespace itk
00130 
00131 // Define instantiation macro for this template.
00132 #define ITK_TEMPLATE_ZeroFluxNeumannBoundaryCondition(_, EXPORT, TypeX, TypeY)     \
00133   namespace itk                                                                    \
00134   {                                                                                \
00135   _( 1 ( class EXPORT ZeroFluxNeumannBoundaryCondition< ITK_TEMPLATE_1 TypeX > ) ) \
00136   namespace Templates                                                              \
00137   {                                                                                \
00138   typedef ZeroFluxNeumannBoundaryCondition< ITK_TEMPLATE_1 TypeX >                 \
00139   ZeroFluxNeumannBoundaryCondition##TypeY;                                       \
00140   }                                                                                \
00141   }
00142 
00143 #if ITK_TEMPLATE_EXPLICIT
00144 #include "Templates/itkZeroFluxNeumannBoundaryCondition+-.h"
00145 #endif
00146 
00147 #if ITK_TEMPLATE_TXX
00148 #include "itkZeroFluxNeumannBoundaryCondition.hxx"
00149 #endif
00150 
00151 /*
00152 #ifndef ITK_MANUAL_INSTANTIATION
00153 #include "itkZeroFluxNeumannBoundaryCondition.hxx"
00154 #endif
00155 */
00156 
00157 #endif
00158