| 1 |
|
/*========================================================================= |
| 2 |
|
|
| 3 |
|
Program: Insight Segmentation & Registration Toolkit |
| 4 |
|
Module: $RCSfile: itkPeriodicBoundaryCondition.h.html,v $ |
| 5 |
|
Language: C++ |
| 6 |
|
Date: $Date: 2006/01/17 19:15:43 $ |
| 7 |
|
Version: $Revision: 1.4 $ |
| 8 |
|
|
| 9 |
|
Copyright (c) Insight Software Consortium. All rights reserved. |
| 10 |
|
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. |
| 11 |
|
|
| 12 |
|
This software is distributed WITHOUT ANY WARRANTY; without even |
| 13 |
|
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| 14 |
|
PURPOSE. See the above copyright notices for more information. |
| 15 |
|
|
| 16 |
|
=========================================================================*/ |
| 17 |
|
#ifndef __itkPeriodicBoundaryCondition_h |
| 18 |
|
#define __itkPeriodicBoundaryCondition_h |
| 19 |
|
#include "itkNeighborhood.h" |
| 20 |
|
#include "itkImageBoundaryCondition.h" |
| 21 |
|
|
| 22 |
|
namespace itk |
| 23 |
|
{ |
| 24 |
|
|
| 25 |
|
/** \class PeriodicBoundaryCondition |
| 26 |
|
* \brief |
| 27 |
|
* A function object that determines values outside of image boundaries |
| 28 |
|
* according to periodic (wrap-around) conditions. |
| 29 |
|
* |
| 30 |
|
* The input to this function object is a neighborhood iterator. This boundary |
| 31 |
|
* condition object is designed to be given as a template argument to a |
| 32 |
|
* NeighborhoodIterator or any of the NeighborhoodIterator subclasses. |
| 33 |
|
* |
| 34 |
|
* \ingroup DataRepresentation |
| 35 |
|
* \ingroup ImageObjects |
| 36 |
|
*/ |
| 37 |
|
template<class TImage> |
| 38 |
|
class ITK_EXPORT PeriodicBoundaryCondition |
| 39 |
IND |
**: public ImageBoundaryCondition<TImage> |
| 40 |
|
{ |
| 41 |
|
public: |
| 42 |
|
/** Standard class typedefs. */ |
| 43 |
|
typedef PeriodicBoundaryCondition Self; |
| 44 |
TDA |
typedef ImageBoundaryCondition<TImage> Superclass; |
| 45 |
|
|
| 46 |
|
/** Extract information from the image type. */ |
| 47 |
|
typedef typename Superclass::PixelType PixelType; |
| 48 |
TDA |
typedef typename Superclass::PixelPointerType PixelPointerType; |
| 49 |
|
typedef typename Superclass::IndexType IndexType; |
| 50 |
TDA |
typedef typename Superclass::OffsetType OffsetType; |
| 51 |
TDA |
typedef typename Superclass::NeighborhoodType NeighborhoodType; |
| 52 |
|
|
| 53 |
|
typedef typename Superclass::NeighborhoodAccessorFunctorType |
| 54 |
IND |
*********************************NeighborhoodAccessorFunctorType; |
| 55 |
|
|
| 56 |
|
/** Extract information from the image type. */ |
| 57 |
|
itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension); |
| 58 |
|
|
| 59 |
|
/** Default constructor. */ |
| 60 |
|
PeriodicBoundaryCondition() {} |
| 61 |
|
|
| 62 |
|
/** Computes and returns a neighborhood of appropriate values from |
| 63 |
|
* neighborhood iterator data.. */ |
| 64 |
|
virtual PixelType operator()(const OffsetType& point_index, |
| 65 |
|
const OffsetType& boundary_offset, |
| 66 |
|
const NeighborhoodType *data) const; |
| 67 |
|
|
| 68 |
|
/** Computes and returns the appropriate pixel value from |
| 69 |
|
* neighborhood iterator data, using the functor. */ |
| 70 |
|
virtual PixelType operator()( |
| 71 |
|
const OffsetType& point_index, |
| 72 |
|
const OffsetType& boundary_offset, |
| 73 |
|
const NeighborhoodType *data, |
| 74 |
|
const NeighborhoodAccessorFunctorType &neighborhoodAccessorFunctor) const; |
| 75 |
|
}; |
| 76 |
|
|
| 77 |
|
} // end namespace itk |
| 78 |
|
|
| 79 |
|
#ifndef ITK_MANUAL_INSTANTIATION |
| 80 |
|
#include "itkPeriodicBoundaryCondition.txx" |
| 81 |
|
#endif |
| 82 |
|
|
| 83 |
|
#endif |
| 84 |
|
|