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 ImageIteratorWithIndex<TImage> &it);
00110
00112 void Set( const PixelType & value) const
00113 { this->m_PixelAccessor.Set(*(const_cast<InternalPixelType *>(this->m_Buffer+this->m_Offset)),value); }
00114
00118 PixelType & Value(void)
00119 { return *(const_cast<InternalPixelType *>(this->m_Buffer+this->m_Offset)); }
00120
00124 Self Begin(void) const;
00125
00129 Self End(void) const;
00130
00131
00132 protected:
00135 ImageRegionIterator( const ImageRegionConstIterator<TImage> &it);
00136 Self & operator=(const ImageRegionConstIterator<TImage> & it);
00137
00138
00139 };
00140
00141 }
00142
00143 #ifndef ITK_MANUAL_INSTANTIATION
00144 #include "itkImageRegionIterator.txx"
00145 #endif
00146
00147 #endif
00148
00149
00150