00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkImageRegionIterator_h
00018 #define __itkImageRegionIterator_h
00019
00020 #include "itkImageRegionConstIterator.h"
00021 #include "itkImageIteratorWithIndex.h"
00022
00023 namespace itk
00024 {
00025
00072 template<typename TImage>
00073 class ITK_EXPORT ImageRegionIterator : public ImageRegionConstIterator<TImage>
00074 {
00075 public:
00077 typedef ImageRegionIterator Self;
00078 typedef ImageRegionConstIterator<TImage> Superclass;
00079
00081 typedef typename Superclass::IndexType IndexType;
00082 typedef typename Superclass::IndexValueType IndexValueType;
00083 typedef typename Superclass::SizeType SizeType;
00084 typedef typename Superclass::SizeValueType SizeValueType;
00085 typedef typename Superclass::OffsetType OffsetType;
00086 typedef typename Superclass::OffsetValueType OffsetValueType;
00087 typedef typename Superclass::RegionType RegionType;
00088 typedef typename Superclass::ImageType ImageType;
00089 typedef typename Superclass::PixelContainer PixelContainer;
00090 typedef typename Superclass::PixelContainerPointer PixelContainerPointer;
00091 typedef typename Superclass::InternalPixelType InternalPixelType;
00092 typedef typename Superclass::PixelType PixelType;
00093 typedef typename Superclass::AccessorType AccessorType;
00094
00095
00097 ImageRegionIterator();
00098
00101 ImageRegionIterator(ImageType *ptr, const RegionType& region);
00102
00109 ImageRegionIterator( const ImageIterator<TImage> &it);
00110
00112 void Set( const PixelType & value) const
00113 {
00114 this->m_PixelAccessorFunctor.Set(*(const_cast<InternalPixelType *>(
00115 this->m_Buffer+this->m_Offset)),value);
00116 }
00117
00121 PixelType & Value(void)
00122 { return *(const_cast<InternalPixelType *>(this->m_Buffer+this->m_Offset)); }
00123
00127 Self Begin(void) const;
00128
00132 Self End(void) const;
00133
00134
00135 protected:
00138 ImageRegionIterator( const ImageRegionConstIterator<TImage> &it);
00139 Self & operator=(const ImageRegionConstIterator<TImage> & it);
00141
00142
00143 };
00144
00145 }
00146
00147
00148 #define ITK_TEMPLATE_ImageRegionIterator(_, EXPORT, x, y) namespace itk { \
00149 _(1(class EXPORT ImageRegionIterator< ITK_TEMPLATE_1 x >)) \
00150 namespace Templates { typedef ImageRegionIterator< ITK_TEMPLATE_1 x > ImageRegionIterator##y; } \
00151 }
00152
00153
00154 #if ITK_TEMPLATE_EXPLICIT
00155 # include "Templates/itkImageRegionIterator+-.h"
00156 #endif
00157
00158 #if ITK_TEMPLATE_TXX
00159 # include "itkImageRegionIterator.txx"
00160 #endif
00161
00162 #endif
00163
00164
00165
00166