00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkLineIterator_h
00018 #define __itkLineIterator_h
00019
00020 #include "itkIndex.h"
00021 #include "itkImage.h"
00022 #include "itkLineConstIterator.h"
00023
00024 namespace itk
00025 {
00026
00051 template<class TImage>
00052 class ITK_EXPORT LineIterator : public LineConstIterator<TImage>
00053 {
00054 public:
00056 typedef LineIterator Self;
00057
00062 itkStaticConstMacro(ImageIteratorDimension, unsigned int,
00063 TImage::ImageDimension);
00064
00066 typedef LineConstIterator<TImage> Superclass;
00067
00069 typedef typename Superclass::IndexType IndexType;
00070 typedef typename Superclass::IndexValueType IndexValueType;
00071 typedef typename Superclass::OffsetType OffsetType;
00072 typedef typename Superclass::OffsetValueType OffsetValueType;
00073 typedef typename Superclass::SizeType SizeType;
00074 typedef typename Superclass::SizeValueType SizeValueType;
00075 typedef typename Superclass::RegionType RegionType;
00076 typedef typename Superclass::ImageType ImageType;
00077 typedef typename Superclass::PixelContainer PixelContainer;
00078 typedef typename Superclass::PixelContainerPointer PixelContainerPointer;
00079 typedef typename Superclass::InternalPixelType InternalPixelType;
00080 typedef typename Superclass::PixelType PixelType;
00081 typedef typename Superclass::AccessorType AccessorType;
00082
00084 itkTypeMacro(LineIterator, LineConstIterator);
00085
00087 void Set( const PixelType & value)
00088 {
00089
00090
00091
00092
00093 const_cast<ImageType *>(this->m_Image.GetPointer())->
00094 SetPixel(this->m_CurrentImageIndex,value);
00095 }
00096
00100 PixelType & Value(void)
00101 {
00102 return this->GetImage()->GetPixel(this->m_ImageIndex);
00103 }
00104
00107 Self &operator=(const Self& it);
00108
00110 LineIterator(ImageType *imagePtr, const IndexType &firstIndex,
00111 const IndexType &lastIndex);
00112
00114 virtual ~LineIterator() {};
00115 };
00116
00117 }
00118
00119 #ifndef ITK_MANUAL_INSTANTIATION
00120 #include "itkLineIterator.txx"
00121 #endif
00122
00123 #endif