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
00047 template<typename TImage>
00048 class ITK_EXPORT ImageRegionIterator : public ImageRegionConstIterator<TImage>
00049 {
00050 public:
00052 typedef ImageRegionIterator Self;
00053 typedef ImageRegionConstIterator<TImage> Superclass;
00054
00056 typedef typename Superclass::IndexType IndexType;
00057 typedef typename Superclass::IndexValueType IndexValueType;
00058 typedef typename Superclass::SizeType SizeType;
00059 typedef typename Superclass::SizeValueType SizeValueType;
00060 typedef typename Superclass::OffsetType OffsetType;
00061 typedef typename Superclass::OffsetValueType OffsetValueType;
00062 typedef typename Superclass::RegionType RegionType;
00063 typedef typename Superclass::ImageType ImageType;
00064 typedef typename Superclass::PixelContainer PixelContainer;
00065 typedef typename Superclass::PixelContainerPointer PixelContainerPointer;
00066 typedef typename Superclass::InternalPixelType InternalPixelType;
00067 typedef typename Superclass::PixelType PixelType;
00068 typedef typename Superclass::AccessorType AccessorType;
00069
00070
00072 ImageRegionIterator();
00073
00076 ImageRegionIterator(ImageType *ptr, const RegionType& region);
00077
00084 ImageRegionIterator( const ImageIteratorWithIndex<TImage> &it);
00085
00087 void Set( const PixelType & value) const
00088 { m_PixelAccessor.Set(*(const_cast<InternalPixelType *>(m_Buffer+m_Offset)),value); }
00089
00093 PixelType & Value(void)
00094 { return *(const_cast<InternalPixelType *>(m_Buffer+m_Offset)); }
00095
00099 Self Begin(void) const;
00100
00104 Self End(void) const;
00105
00106
00107 protected:
00110 ImageRegionIterator( const ImageRegionConstIterator<TImage> &it);
00111 Self & operator=(const ImageRegionConstIterator<TImage> & it);
00112
00113
00114 };
00115
00116 }
00117
00118 #ifndef ITK_MANUAL_INSTANTIATION
00119 #include "itkImageRegionIterator.txx"
00120 #endif
00121
00122 #endif
00123
00124
00125