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/01/30 20:56:08 $
00007   Version:   $Revision: 1.39 $
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 #include "itkImageIteratorWithIndex.h"
00022 
00023 namespace itk
00024 {
00025 
00072 template<typename TImage>
00073 class ITK_EXPORT ImageRegionIterator : public ImageRegionConstIterator<TImage>
00074 {
00075 public:
00077   typedef ImageRegionIterator Self;
00078   typedef ImageRegionConstIterator<TImage>  Superclass;
00079 
00081   typedef typename Superclass::IndexType              IndexType;
00082   typedef typename Superclass::IndexValueType         IndexValueType;
00083   typedef typename Superclass::SizeType               SizeType;
00084   typedef typename Superclass::SizeValueType          SizeValueType;
00085   typedef typename Superclass::OffsetType             OffsetType;
00086   typedef typename Superclass::OffsetValueType        OffsetValueType;
00087   typedef typename Superclass::RegionType             RegionType;
00088   typedef typename Superclass::ImageType              ImageType;
00089   typedef typename Superclass::PixelContainer         PixelContainer;
00090   typedef typename Superclass::PixelContainerPointer  PixelContainerPointer;
00091   typedef typename Superclass::InternalPixelType      InternalPixelType;
00092   typedef typename Superclass::PixelType              PixelType;
00093   typedef typename Superclass::AccessorType           AccessorType;
00094 
00095 
00097   ImageRegionIterator();
00098 
00101   ImageRegionIterator(ImageType *ptr, const RegionType& region);
00102 
00109   ImageRegionIterator( const ImageIterator<TImage> &it);
00110 
00112   void Set( const PixelType & value) const  
00113     { 
00114     this->m_PixelAccessorFunctor.Set(*(const_cast<InternalPixelType *>(
00115             this->m_Buffer+this->m_Offset)),value); 
00116     }
00117 
00121   PixelType & Value(void) 
00122     { return *(const_cast<InternalPixelType *>(this->m_Buffer+this->m_Offset)); }
00123 
00127   Self Begin(void) const;
00128 
00132   Self End(void) const;
00133 
00134 
00135 protected:
00138   ImageRegionIterator( const ImageRegionConstIterator<TImage> &it);
00139   Self & operator=(const ImageRegionConstIterator<TImage> & it);
00141 
00142 
00143 };
00144 
00145 } // end namespace itk
00146 
00147 // Define instantiation macro for this template.
00148 #define ITK_TEMPLATE_ImageRegionIterator(_, EXPORT, x, y) namespace itk { \
00149   _(1(class EXPORT ImageRegionIterator< ITK_TEMPLATE_1 x >)) \
00150   namespace Templates { typedef ImageRegionIterator< ITK_TEMPLATE_1 x > ImageRegionIterator##y; } \
00151   }
00152 
00153 
00154 #if ITK_TEMPLATE_EXPLICIT
00155 # include "Templates/itkImageRegionIterator+-.h"
00156 #endif
00157 
00158 #if ITK_TEMPLATE_TXX
00159 # include "itkImageRegionIterator.txx"
00160 #endif
00161 
00162 #endif 
00163 
00164 
00165 
00166 

Generated at Sun Sep 23 13:04:10 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000