17 #ifndef __itkPeriodicBoundaryCondition_txx
18 #define __itkPeriodicBoundaryCondition_txx
23 template<
class TImage>
24 typename PeriodicBoundaryCondition<TImage>::PixelType
32 typename TImage::PixelType *ptr;
39 for (i = 0; i < ImageDimension; ++i)
41 linear_index += (point_index[i] + boundary_offset[i]) * data->
GetStride(i);
43 ptr = data->operator[](linear_index);
51 const typename TImage::OffsetValueType * offset_table
55 for (i = 0; i < ImageDimension; ++i)
57 if (boundary_offset[i] != 0)
60 if (point_index[i] < static_cast<OffsetValueType>(iterator->
GetRadius(i)))
63 offset_table[i] - boundary_offset[i] * offset_table[i];
68 offset_table[i] + boundary_offset[i] * offset_table[i];
76 template<
class TImage>
86 typename TImage::PixelType *ptr;
96 for (i = 0; i < ImageDimension; ++i)
98 linear_index += (point_index[i] + boundary_offset[i]) * data->
GetStride(i);
100 ptr = data->operator[](linear_index);
108 const typename TImage::OffsetValueType * offset_table
112 for (i = 0; i < ImageDimension; ++i)
114 if (boundary_offset[i] != 0)
117 if (point_index[i] < static_cast<OffsetValueType>(iterator->
GetRadius(i)))
120 offset_table[i] - boundary_offset[i] * offset_table[i];
125 offset_table[i] + boundary_offset[i] * offset_table[i];
130 return neighborhoodAccessorFunctor.Get(ptr);