Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkImageSliceConstIteratorWithIndex.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkImageSliceConstIteratorWithIndex.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/08/03 20:20:21 $
00007   Version:   $Revision: 1.11 $
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 __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     }
00153 
00160   ImageSliceConstIteratorWithIndex( const ImageConstIteratorWithIndex<TImage> &it)
00161     { this->ImageConstIteratorWithIndex<TImage>::operator=(it); }
00162 
00165   void NextLine(void);
00166 
00169   void NextSlice(void);
00170 
00173   void PreviousLine(void);
00174 
00177   void PreviousSlice(void);
00178 
00180   bool IsAtEndOfLine(void);
00181 
00183   bool IsAtEndOfSlice(void);
00184 
00186   bool IsAtReverseEndOfLine(void);
00187 
00189   bool IsAtReverseEndOfSlice(void);
00190 
00192   void SetFirstDirection(unsigned int direction);
00193 
00195   void SetSecondDirection(unsigned int direction);
00196 
00200   inline Self & operator++();
00201 
00205   inline Self & operator--();
00206 
00207 private:
00208   unsigned long  m_PixelJump;
00209   unsigned long  m_LineJump;
00210   unsigned int   m_Direction_A;
00211   unsigned int   m_Direction_B;
00212 };
00213 
00214 } // end namespace itk
00215 
00216 #ifndef ITK_MANUAL_INSTANTIATION
00217 #include "itkImageSliceConstIteratorWithIndex.txx"
00218 #endif
00219 
00220 #endif 
00221 

Generated at Tue Jul 29 20:45:09 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000