00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkImageIteratorWithIndex_h
00018 #define __itkImageIteratorWithIndex_h
00019
00020 #include "itkImageConstIteratorWithIndex.h"
00021
00022 namespace itk
00023 {
00024
00042 template<typename TImage>
00043 class ITK_EXPORT ImageIteratorWithIndex : public ImageConstIteratorWithIndex<TImage>
00044 {
00045 public:
00047 typedef ImageIteratorWithIndex Self;
00048
00053 itkStaticConstMacro(ImageIteratorDimension, unsigned int,
00054 TImage::ImageDimension);
00055
00057 typedef ImageConstIteratorWithIndex<TImage> Superclass;
00058
00060 typedef typename Superclass::IndexType IndexType;
00061 typedef typename Superclass::IndexValueType IndexValueType;
00062 typedef typename Superclass::SizeType SizeType;
00063 typedef typename Superclass::SizeValueType SizeValueType;
00064 typedef typename Superclass::OffsetType OffsetType;
00065 typedef typename Superclass::OffsetValueType OffsetValueType;
00066 typedef typename Superclass::RegionType RegionType;
00067 typedef typename Superclass::ImageType ImageType;
00068 typedef typename Superclass::PixelContainer PixelContainer;
00069 typedef typename Superclass::PixelContainerPointer PixelContainerPointer;
00070 typedef typename Superclass::InternalPixelType InternalPixelType;
00071 typedef typename Superclass::PixelType PixelType;
00072 typedef typename Superclass::AccessorType AccessorType;
00073
00074
00077 ImageIteratorWithIndex();
00078
00080 ~ImageIteratorWithIndex() {};
00081
00082
00085 ImageIteratorWithIndex(const Self& it);
00086
00089 ImageIteratorWithIndex(TImage *ptr, const RegionType& region);
00090
00093 Self &operator=(const Self& it);
00094
00096 void Set( const PixelType & value) const
00097 { m_PixelAccessor.Set(*(const_cast<InternalPixelType *>(m_Position)),value); }
00098
00102 PixelType & Value(void)
00103 { return *(const_cast<InternalPixelType *>(m_Position)); }
00104
00105 protected:
00106
00108 ImageIteratorWithIndex(const ImageConstIteratorWithIndex<TImage> & it);
00109 Self &operator=(const ImageConstIteratorWithIndex<TImage> & it);
00110 };
00111
00112 }
00113
00114 #ifndef ITK_MANUAL_INSTANTIATION
00115 #include "itkImageIteratorWithIndex.txx"
00116 #endif
00117
00118 #endif