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

itkImageIterator.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkImageIterator.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/08/12 14:02:56 $
00007   Version:   $Revision: 1.50 $
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 __itkImageIterator_h
00018 #define __itkImageIterator_h
00019 
00020 #include "itkImageConstIterator.h"
00021 
00022 namespace itk
00023 {
00024 
00062 template<typename TImage>
00063 class ITK_EXPORT ImageIterator : public ImageConstIterator<TImage>
00064 {
00065 public:
00067   typedef ImageIterator Self;
00068 
00073   itkStaticConstMacro(ImageIteratorDimension, unsigned int,
00074                       TImage::ImageDimension);
00075 
00077   typedef ImageConstIterator<TImage> Superclass;
00078 
00080   typedef typename Superclass::IndexType              IndexType;
00081   typedef typename Superclass::IndexValueType         IndexValueType;
00082   typedef typename Superclass::SizeType               SizeType;
00083   typedef typename Superclass::SizeValueType          SizeValueType;
00084   typedef typename Superclass::OffsetType             OffsetType;
00085   typedef typename Superclass::OffsetValueType        OffsetValueType;
00086   typedef typename Superclass::RegionType             RegionType;
00087   typedef typename Superclass::ImageType              ImageType;
00088   typedef typename Superclass::PixelContainer         PixelContainer;
00089   typedef typename Superclass::PixelContainerPointer  PixelContainerPointer;
00090   typedef typename Superclass::InternalPixelType      InternalPixelType;
00091   typedef typename Superclass::PixelType              PixelType;
00092   typedef typename Superclass::AccessorType           AccessorType;
00093 
00094 
00097   ImageIterator();
00098 
00100   ~ImageIterator() {};
00101 
00102 
00105   ImageIterator(const Self& it);
00106 
00109   ImageIterator(TImage *ptr, const RegionType& region);
00110 
00113   Self &operator=(const Self& it);
00114   
00116   void Set( const PixelType & value) const  
00117     { 
00118     this->m_PixelAccessorFunctor.Set(*(const_cast<InternalPixelType *>
00119           (this->m_Buffer)+this->m_Offset), value); 
00120     }
00121 
00125   PixelType & Value(void) 
00126     { return *(const_cast<InternalPixelType *>(this->m_Buffer)+this->m_Offset); }
00127 
00131   Self Begin(void) const;
00132 
00136   Self End(void) const;
00137 
00139   ImageType * GetImage() const
00140     { return const_cast<ImageType *>( this->m_Image.GetPointer() ); };
00141 
00142 
00143 protected:
00144 
00146   ImageIterator(const ImageConstIterator<TImage> & it);
00147   Self &operator=(const ImageConstIterator<TImage> & it);
00148 };
00149 
00150 } // end namespace itk
00151 
00152 #ifndef ITK_MANUAL_INSTANTIATION
00153 #include "itkImageIterator.txx"
00154 #endif
00155 
00156 #endif 

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