00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkImageLinearConstIteratorWithIndex.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:29:11 $ 00007 Version: $Revision: 1.10 $ 00008 00009 Copyright (c) Insight Software Consortium. All rights reserved. 00010 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 #ifndef __itkImageLinearConstIteratorWithIndex_h 00018 #define __itkImageLinearConstIteratorWithIndex_h 00019 00020 #include "itkImageConstIteratorWithIndex.h" 00021 00022 namespace itk 00023 { 00024 00078 template<typename TImage> 00079 class ITK_EXPORT ImageLinearConstIteratorWithIndex : public ImageConstIteratorWithIndex<TImage> 00080 { 00081 public: 00083 typedef ImageLinearConstIteratorWithIndex Self; 00084 typedef ImageConstIteratorWithIndex<TImage> Superclass; 00085 00090 typedef typename TImage::IndexType IndexType; 00091 00096 typedef typename TImage::RegionType RegionType; 00097 00102 typedef TImage ImageType; 00103 00107 typedef typename TImage::PixelContainer PixelContainer; 00108 typedef typename PixelContainer::Pointer PixelContainerPointer; 00109 00111 ImageLinearConstIteratorWithIndex() : ImageConstIteratorWithIndex<TImage>() {} 00112 00115 ImageLinearConstIteratorWithIndex(const ImageType *ptr, 00116 const RegionType& region) 00117 : ImageConstIteratorWithIndex<TImage>( ptr, region ) {} 00118 00125 ImageLinearConstIteratorWithIndex( const ImageConstIteratorWithIndex<TImage> &it) 00126 { this->ImageConstIteratorWithIndex<TImage>::operator=(it); } 00127 00130 inline void NextLine(void); 00131 00134 inline void PreviousLine(void); 00135 00138 void GoToBeginOfLine(void); 00139 00142 void GoToEndOfLine(void); 00143 00145 inline bool IsAtEndOfLine(void); 00146 00148 inline bool IsAtReverseEndOfLine(void); 00149 00151 inline void SetDirection(unsigned int direction) ; 00152 00155 Self & operator++(); 00156 00159 Self & operator--(); 00160 00161 private: 00162 unsigned long m_Jump; 00163 unsigned int m_Direction; 00164 }; 00165 00166 } // end namespace itk 00167 00168 #ifndef ITK_MANUAL_INSTANTIATION 00169 #include "itkImageLinearConstIteratorWithIndex.txx" 00170 #endif 00171 00172 #endif