ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
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 __itkPeriodicBoundaryCondition_h 00019 #define __itkPeriodicBoundaryCondition_h 00020 #include "itkImageBoundaryCondition.h" 00021 00022 namespace itk 00023 { 00037 template< class TInputImage, class TOutputImage = TInputImage > 00038 class ITK_EXPORT PeriodicBoundaryCondition: 00039 public ImageBoundaryCondition< TInputImage, TOutputImage > 00040 { 00041 public: 00043 typedef PeriodicBoundaryCondition Self; 00044 typedef ImageBoundaryCondition< TInputImage, TOutputImage > Superclass; 00045 00047 typedef typename Superclass::PixelType PixelType; 00048 typedef typename Superclass::PixelPointerType PixelPointerType; 00049 typedef typename Superclass::OutputPixelType OutputPixelType; 00050 typedef typename Superclass::RegionType RegionType; 00051 typedef typename Superclass::IndexType IndexType; 00052 typedef typename Superclass::SizeType SizeType; 00053 typedef typename Superclass::OffsetType OffsetType; 00054 typedef typename Superclass::NeighborhoodType NeighborhoodType; 00055 00056 typedef typename Superclass::NeighborhoodAccessorFunctorType 00057 NeighborhoodAccessorFunctorType; 00058 00060 itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension); 00061 00063 PeriodicBoundaryCondition() {} 00064 00066 virtual const char * GetNameOfClass() const 00067 { 00068 return "itkPeriodicBoundaryCondition"; 00069 } 00070 00073 virtual OutputPixelType operator()(const OffsetType & point_index, 00074 const OffsetType & boundary_offset, 00075 const NeighborhoodType *data) const; 00076 00079 virtual OutputPixelType operator()( 00080 const OffsetType & point_index, 00081 const OffsetType & boundary_offset, 00082 const NeighborhoodType *data, 00083 const NeighborhoodAccessorFunctorType & neighborhoodAccessorFunctor) const; 00084 00098 virtual RegionType GetInputRequestedRegion( const RegionType & inputLargestPossibleRegion, 00099 const RegionType & outputRequestedRegion ) const; 00100 00109 OutputPixelType GetPixel( const IndexType & index, const TInputImage * image ) const; 00110 00111 }; 00112 } // end namespace itk 00113 00114 // Define instantiation macro for this template. 00115 #define ITK_TEMPLATE_PeriodicBoundaryCondition(_, EXPORT, TypeX, TypeY) \ 00116 namespace itk \ 00117 { \ 00118 _( 1 ( class EXPORT PeriodicBoundaryCondition< ITK_TEMPLATE_1 TypeX > ) ) \ 00119 namespace Templates \ 00120 { \ 00121 typedef PeriodicBoundaryCondition< ITK_TEMPLATE_1 TypeX > \ 00122 PeriodicBoundaryCondition##TypeY; \ 00123 } \ 00124 } 00125 00126 #if ITK_TEMPLATE_EXPLICIT 00127 #include "Templates/itkPeriodicBoundaryCondition+-.h" 00128 #endif 00129 00130 #if ITK_TEMPLATE_TXX 00131 #include "itkPeriodicBoundaryCondition.hxx" 00132 #endif 00133 00134 #endif 00135