# Boundary Condition Changes

Cory Quammen
2011-07-13
ImageBoundaryCondition has a new pure virtual method, GetPixel(), that must be overridden by subclasses. Given the index of an output image and an input image, this method should return a pixel value appropriate for the boundary condition. If the index is inside the input image bounds, the image pixel value at that index is returned, otherwise the value determined by the boundary condition is returned.
template< class TImage > class CustomBoundaryCondition: public ImageBoundaryCondition< TImage > { // No GetPixel() method was required to be defined. };
template< class TImage > class CustomBoundaryCondition: public ImageBoundaryCondition< TImage > {

virtual PixelType GetPixel( const IndexType & index, const TImageType * image ) const { // Compute pixel value ... return pixelValue; }

};
I8de7c1989577ebf316340fab68d748edf0e5f833
Modules/Core/Common/include/itkConstNeighborhoodIterator.h Modules/Core/Common/include/itkConstNeighborhoodIterator.txx Modules/Core/Common/include/itkConstantBoundaryCondition.h Modules/Core/Common/include/itkConstantBoundaryCondition.txx Modules/Core/Common/include/itkImageBoundaryCondition.h Modules/Core/Common/include/itkPeriodicBoundaryCondition.h Modules/Core/Common/include/itkPeriodicBoundaryCondition.txx Modules/Core/Common/include/itkZeroFluxNeumannBoundaryCondition.h Modules/Core/Common/include/itkZeroFluxNeumannBoundaryCondition.txx Modules/Core/Common/test/CMakeLists.txt Modules/Core/Common/test/itkConstantBoundaryConditionTest.cxx Modules/Core/Common/test/itkPeriodicBoundaryConditionTest.cxx Modules/Core/Common/test/itkZeroFluxBoundaryConditionTest.cxx