00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkImageSliceConstIteratorWithIndex_h
00018 #define __itkImageSliceConstIteratorWithIndex_h
00019
00020 #include "itkImageConstIteratorWithIndex.h"
00021
00022 namespace itk
00023 {
00024
00111 template<typename TImage>
00112 class ITK_EXPORT ImageSliceConstIteratorWithIndex : public ImageConstIteratorWithIndex<TImage>
00113 {
00114 public:
00116 typedef ImageSliceConstIteratorWithIndex Self;
00117 typedef ImageConstIteratorWithIndex<TImage> Superclass;
00118
00123 typedef typename TImage::IndexType IndexType;
00124
00129 typedef TImage ImageType;
00130
00132 typedef typename TImage::RegionType RegionType;
00133
00137 typedef typename TImage::PixelContainer PixelContainer;
00138 typedef typename PixelContainer::Pointer PixelContainerPointer;
00139
00141 ImageSliceConstIteratorWithIndex() : ImageConstIteratorWithIndex<TImage>() {}
00142
00145 ImageSliceConstIteratorWithIndex( const ImageType *ptr,
00146 const RegionType & region)
00147 : ImageConstIteratorWithIndex<TImage>(ptr, region)
00148 {
00149 m_Direction_A = 0;
00150 m_Direction_B = 1;
00151 }
00152
00159 ImageSliceConstIteratorWithIndex( const ImageConstIteratorWithIndex<TImage> &it)
00160 { this->ImageConstIteratorWithIndex<TImage>::operator=(it); }
00161
00164 void NextLine(void);
00165
00168 void NextSlice(void);
00169
00172 void PreviousLine(void);
00173
00176 void PreviousSlice(void);
00177
00179 bool IsAtEndOfLine(void);
00180
00182 bool IsAtEndOfSlice(void);
00183
00185 bool IsAtReverseEndOfLine(void);
00186
00188 bool IsAtReverseEndOfSlice(void);
00189
00191 void SetFirstDirection(unsigned int direction);
00192
00194 void SetSecondDirection(unsigned int direction);
00195
00199 inline Self & operator++();
00200
00204 inline Self & operator--();
00205
00206 private:
00207 unsigned long m_PixelJump;
00208 unsigned long m_LineJump;
00209 unsigned int m_Direction_A;
00210 unsigned int m_Direction_B;
00211 };
00212
00213 }
00214
00215 #ifndef ITK_MANUAL_INSTANTIATION
00216 #include "itkImageSliceConstIteratorWithIndex.txx"
00217 #endif
00218
00219 #endif