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

itkImageRegionIterator.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkImageRegionIterator.h,v $
00005   Language:  C++
00006   Date:      $Date: 2007/09/24 10:50:36 $
00007   Version:   $Revision: 1.40 $
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 __itkImageRegionIterator_h
00018 #define __itkImageRegionIterator_h
00019 
00020 #include "itkImageRegionConstIterator.h"
00021 
00022 namespace itk
00023 {
00024 
00071 template<typename TImage>
00072 class ITK_EXPORT ImageRegionIterator : public ImageRegionConstIterator<TImage>
00073 {
00074 public:
00076   typedef ImageRegionIterator Self;
00077   typedef ImageRegionConstIterator<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 
00096   ImageRegionIterator();
00097 
00100   ImageRegionIterator(ImageType *ptr, const RegionType& region);
00101 
00108   ImageRegionIterator( const ImageIterator<TImage> &it);
00109 
00111   void Set( const PixelType & value) const  
00112     { 
00113     this->m_PixelAccessorFunctor.Set(*(const_cast<InternalPixelType *>(
00114             this->m_Buffer+this->m_Offset)),value); 
00115     }
00116 
00120   PixelType & Value(void) 
00121     { return *(const_cast<InternalPixelType *>(this->m_Buffer+this->m_Offset)); }
00122 
00126   Self Begin(void) const;
00127 
00131   Self End(void) const;
00132 
00133 
00134 protected:
00137   ImageRegionIterator( const ImageRegionConstIterator<TImage> &it);
00138   Self & operator=(const ImageRegionConstIterator<TImage> & it);
00140 
00141 
00142 };
00143 
00144 } // end namespace itk
00145 
00146 // Define instantiation macro for this template.
00147 #define ITK_TEMPLATE_ImageRegionIterator(_, EXPORT, x, y) namespace itk { \
00148   _(1(class EXPORT ImageRegionIterator< ITK_TEMPLATE_1 x >)) \
00149   namespace Templates { typedef ImageRegionIterator< ITK_TEMPLATE_1 x > ImageRegionIterator##y; } \
00150   }
00151 
00152 
00153 #if ITK_TEMPLATE_EXPLICIT
00154 # include "Templates/itkImageRegionIterator+-.h"
00155 #endif
00156 
00157 #if ITK_TEMPLATE_TXX
00158 # include "itkImageRegionIterator.txx"
00159 #endif
00160 
00161 #endif 
00162 
00163 
00164 
00165 

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