itkImageRegionIterator.h
Go to the documentation of this file.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
00022 namespace itk
00023 {
00024
00071 template<typename TImage>
00072 class ITK_EXPORT ImageRegionIterator : public ImageRegionConstIterator<TImage>
00073 {
00074 public:
00076 typedef ImageRegionIterator Self;
00077 typedef ImageRegionConstIterator<TImage> Superclass;
00078
00080 typedef typename Superclass::IndexType IndexType;
00081 typedef typename Superclass::IndexValueType IndexValueType;
00082 typedef typename Superclass::SizeType SizeType;
00083 typedef typename Superclass::SizeValueType SizeValueType;
00084 typedef typename Superclass::OffsetType OffsetType;
00085 typedef typename Superclass::OffsetValueType OffsetValueType;
00086 typedef typename Superclass::RegionType RegionType;
00087 typedef typename Superclass::ImageType ImageType;
00088 typedef typename Superclass::PixelContainer PixelContainer;
00089 typedef typename Superclass::PixelContainerPointer PixelContainerPointer;
00090 typedef typename Superclass::InternalPixelType InternalPixelType;
00091 typedef typename Superclass::PixelType PixelType;
00092 typedef typename Superclass::AccessorType AccessorType;
00093
00094
00096 ImageRegionIterator();
00097
00100 ImageRegionIterator(ImageType *ptr, const RegionType& region);
00101
00108 ImageRegionIterator( const ImageIterator<TImage> &it);
00109
00111 void Set( const PixelType & value) const
00112 {
00113 this->m_PixelAccessorFunctor.Set(*(const_cast<InternalPixelType *>(
00114 this->m_Buffer+this->m_Offset)),value);
00115 }
00116
00120 PixelType & Value(void)
00121 { return *(const_cast<InternalPixelType *>(this->m_Buffer+this->m_Offset)); }
00122
00126 Self Begin(void) const;
00127
00131 Self End(void) const;
00132
00133
00134 protected:
00137 ImageRegionIterator( const ImageRegionConstIterator<TImage> &it);
00138 Self & operator=(const ImageRegionConstIterator<TImage> & it);
00140
00141
00142 };
00143
00144 }
00145
00146
00147 #define ITK_TEMPLATE_ImageRegionIterator(_, EXPORT, x, y) namespace itk { \
00148 _(1(class EXPORT ImageRegionIterator< ITK_TEMPLATE_1 x >)) \
00149 namespace Templates { typedef ImageRegionIterator< ITK_TEMPLATE_1 x > ImageRegionIterator##y; } \
00150 }
00151
00152
00153 #if ITK_TEMPLATE_EXPLICIT
00154 # include "Templates/itkImageRegionIterator+-.h"
00155 #endif
00156
00157 #if ITK_TEMPLATE_TXX
00158 # include "itkImageRegionIterator.txx"
00159 #endif
00160
00161 #endif
00162