00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkImageLinearConstIteratorWithIndex.h,v $ 00005 Language: C++ 00006 Date: $Date: 2005/07/13 13:54:35 $ 00007 Version: $Revision: 1.14 $ 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 00101 template<typename TImage> 00102 class ITK_EXPORT ImageLinearConstIteratorWithIndex : public ImageConstIteratorWithIndex<TImage> 00103 { 00104 public: 00106 typedef ImageLinearConstIteratorWithIndex Self; 00107 typedef ImageConstIteratorWithIndex<TImage> Superclass; 00108 00113 typedef typename TImage::IndexType IndexType; 00114 00119 typedef typename TImage::RegionType RegionType; 00120 00125 typedef TImage ImageType; 00126 00130 typedef typename TImage::PixelContainer PixelContainer; 00131 typedef typename PixelContainer::Pointer PixelContainerPointer; 00132 00134 ImageLinearConstIteratorWithIndex() : ImageConstIteratorWithIndex<TImage>() {} 00135 00138 ImageLinearConstIteratorWithIndex(const ImageType *ptr, const RegionType& region); 00139 00146 ImageLinearConstIteratorWithIndex( const ImageConstIteratorWithIndex<TImage> &it) 00147 { this->ImageConstIteratorWithIndex<TImage>::operator=(it); } 00148 00151 inline void NextLine(void); 00152 00155 inline void PreviousLine(void); 00156 00159 void GoToBeginOfLine(void); 00160 00163 void GoToReverseBeginOfLine(void); 00164 00167 void GoToEndOfLine(void); 00168 00170 inline bool IsAtEndOfLine(void); 00171 00173 inline bool IsAtReverseEndOfLine(void); 00174 00176 inline void SetDirection(unsigned int direction) ; 00177 00180 inline Self & operator++(); 00181 00184 inline Self & operator--(); 00185 00186 private: 00187 unsigned long m_Jump; 00188 unsigned int m_Direction; 00189 }; 00190 00191 } // end namespace itk 00192 00193 #ifndef ITK_MANUAL_INSTANTIATION 00194 #include "itkImageLinearConstIteratorWithIndex.txx" 00195 #endif 00196 00197 #endif 00198
1.4.2 written by Dimitri van Heesch,
© 1997-2000