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: 2009-08-14 20:48:00 $
00007   Version:   $Revision: 1.13 $
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 
00168   void GoToBeginOfSlice(void);
00169 
00172   void NextSlice(void);
00173 
00176   void PreviousLine(void);
00177 
00180   void PreviousSlice(void);
00181 
00183   bool IsAtEndOfLine(void);
00184 
00186   bool IsAtEndOfSlice(void);
00187 
00189   bool IsAtReverseEndOfLine(void);
00190 
00192   bool IsAtReverseEndOfSlice(void);
00193 
00195   void SetFirstDirection(unsigned int direction);
00196 
00198   void SetSecondDirection(unsigned int direction);
00199 
00203   inline Self & operator++();
00204 
00208   inline Self & operator--();
00209 
00210 private:
00211   unsigned long  m_PixelJump;
00212   unsigned long  m_LineJump;
00213   unsigned int   m_Direction_A;
00214   unsigned int   m_Direction_B;
00215 };
00216 
00217 } // end namespace itk
00218 
00219 #ifndef ITK_MANUAL_INSTANTIATION
00220 #include "itkImageSliceConstIteratorWithIndex.txx"
00221 #endif
00222 
00223 #endif 
00224 

Generated at Tue Sep 15 03:28:46 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000