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     }
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 } // end namespace itk
00214 
00215 #ifndef ITK_MANUAL_INSTANTIATION
00216 #include "itkImageSliceConstIteratorWithIndex.txx"
00217 #endif
00218 
00219 #endif 

Generated at Wed May 24 23:25:57 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000