ITK  4.2.0
Insight Segmentation and Registration Toolkit
itkPeriodicBoundaryCondition.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __itkPeriodicBoundaryCondition_h
19 #define __itkPeriodicBoundaryCondition_h
21 
22 namespace itk
23 {
37 template< class TInputImage, class TOutputImage = TInputImage >
38 class ITK_EXPORT PeriodicBoundaryCondition:
39  public ImageBoundaryCondition< TInputImage, TOutputImage >
40 {
41 public:
45 
47  typedef typename Superclass::PixelType PixelType;
51  typedef typename Superclass::IndexType IndexType;
52  typedef typename Superclass::SizeType SizeType;
55 
58 
60  itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension);
61 
64 
66  virtual const char * GetNameOfClass() const
67  {
68  return "itkPeriodicBoundaryCondition";
69  }
70 
73  virtual OutputPixelType operator()(const OffsetType & point_index,
74  const OffsetType & boundary_offset,
75  const NeighborhoodType *data) const;
76 
79  virtual OutputPixelType operator()(
80  const OffsetType & point_index,
81  const OffsetType & boundary_offset,
82  const NeighborhoodType *data,
83  const NeighborhoodAccessorFunctorType & neighborhoodAccessorFunctor) const;
84 
98  virtual RegionType GetInputRequestedRegion( const RegionType & inputLargestPossibleRegion,
99  const RegionType & outputRequestedRegion ) const;
100 
109  OutputPixelType GetPixel( const IndexType & index, const TInputImage * image ) const;
110 
111 };
112 } // end namespace itk
113 
114 // Define instantiation macro for this template.
115 #define ITK_TEMPLATE_PeriodicBoundaryCondition(_, EXPORT, TypeX, TypeY) \
116  namespace itk \
117  { \
118  _( 1 ( class EXPORT PeriodicBoundaryCondition< ITK_TEMPLATE_1 TypeX > ) ) \
119  namespace Templates \
120  { \
121  typedef PeriodicBoundaryCondition< ITK_TEMPLATE_1 TypeX > \
122  PeriodicBoundaryCondition##TypeY; \
123  } \
124  }
125 
126 #if ITK_TEMPLATE_EXPLICIT
127 #include "Templates/itkPeriodicBoundaryCondition+-.h"
128 #endif
129 
130 #if ITK_TEMPLATE_TXX
131 #include "itkPeriodicBoundaryCondition.hxx"
132 #endif
133 
134 #endif
135