00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkSmartNeighborhoodIterator_h
00018 #define __itkSmartNeighborhoodIterator_h
00019
00020 #include "itkConstSmartNeighborhoodIterator.h"
00021
00022 namespace itk {
00023
00096 template<class TImage, class TBoundaryCondition
00097 = ZeroFluxNeumannBoundaryCondition<TImage> >
00098 class ITK_EXPORT SmartNeighborhoodIterator
00099 : public ConstSmartNeighborhoodIterator<TImage>
00100 {
00101 public:
00103 typedef SmartNeighborhoodIterator Self;
00104 typedef ConstSmartNeighborhoodIterator<TImage> Superclass;
00105
00107 typedef typename Superclass::InternalPixelType InternalPixelType;
00108 typedef typename Superclass::PixelType PixelType;
00109 typedef typename Superclass::ImageType ImageType;
00110 typedef typename Superclass::RegionType RegionType;
00111 typedef typename Superclass::SizeType SizeType;
00112 typedef typename Superclass::NeighborhoodType NeighborhoodType;
00113 typedef typename Superclass::IndexType IndexType;
00114 typedef typename Superclass::OffsetType OffsetType;
00115 typedef typename Superclass::ImageBoundaryConditionPointerType
00116 ImageBoundaryConditionPointerType;
00117 typedef typename Superclass::BoundaryConditionType BoundaryConditionType;
00118 typedef typename Superclass::OffsetValueType OffsetValueType;
00119 typedef typename Superclass::Iterator Iterator;
00120
00122 itkStaticConstMacro(Dimension, unsigned int,
00123 Superclass::Dimension);
00124
00126 SmartNeighborhoodIterator()
00127 : Superclass() {}
00128
00130 SmartNeighborhoodIterator(const Self& orig)
00131 : Superclass(orig) {}
00132
00134 Self &operator=(const Self& orig)
00135 {
00136 Superclass::operator=(orig);
00137 return *this;
00138 }
00139
00143 SmartNeighborhoodIterator(const SizeType& radius, ImageType *ptr,
00144 const RegionType& region)
00145 : Superclass(radius, ptr, region) {}
00146
00149 virtual void PrintSelf(std::ostream &, Indent) const;
00150
00152 InternalPixelType *GetCenterPointer()
00153 { return (this->operator[]((this->Size())>>1)); }
00154
00156 virtual void SetCenterPixel(const PixelType &p)
00157 { *( this->GetCenterPointer() ) = p; }
00158
00161 virtual void SetNeighborhood(NeighborhoodType &);
00162
00165 virtual void SetPixel(const unsigned long i, const PixelType &v);
00166
00169 virtual void SetPixel(const unsigned long i, const PixelType &v, bool &status);
00170
00171 };
00172
00173 }
00174
00175 #ifndef ITK_MANUAL_INSTANTIATION
00176 #include "itkSmartNeighborhoodIterator.txx"
00177 #endif
00178
00179 #endif
00180