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

itkImageIteratorWithIndex.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkImageIteratorWithIndex.h,v $
00005   Language:  C++
00006   Date:      $Date: 2004-12-11 20:29:18 $
00007   Version:   $Revision: 1.33 $
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 __itkImageIteratorWithIndex_h
00018 #define __itkImageIteratorWithIndex_h
00019 
00020 #include "itkImageConstIteratorWithIndex.h"
00021 
00022 namespace itk
00023 {
00024 
00066 template<typename TImage>
00067 class ITK_EXPORT ImageIteratorWithIndex : public ImageConstIteratorWithIndex<TImage>
00068 {
00069 public:
00070 
00072   typedef ImageIteratorWithIndex Self;
00073 
00078   itkStaticConstMacro(ImageIteratorDimension, unsigned int,
00079                       TImage::ImageDimension);
00080 
00082   typedef ImageConstIteratorWithIndex<TImage> Superclass;
00083 
00085   typedef typename Superclass::IndexType              IndexType;
00086   typedef typename Superclass::IndexValueType         IndexValueType;
00087   typedef typename Superclass::SizeType               SizeType;
00088   typedef typename Superclass::SizeValueType          SizeValueType;
00089   typedef typename Superclass::OffsetType             OffsetType;
00090   typedef typename Superclass::OffsetValueType        OffsetValueType;
00091   typedef typename Superclass::RegionType             RegionType;
00092   typedef typename Superclass::ImageType              ImageType;
00093   typedef typename Superclass::PixelContainer         PixelContainer;
00094   typedef typename Superclass::PixelContainerPointer  PixelContainerPointer;
00095   typedef typename Superclass::InternalPixelType      InternalPixelType;
00096   typedef typename Superclass::PixelType              PixelType;
00097   typedef typename Superclass::AccessorType           AccessorType;
00098 
00099 
00102   ImageIteratorWithIndex();
00103 
00105   ~ImageIteratorWithIndex() {};
00106 
00107 
00110   ImageIteratorWithIndex(const Self& it);
00111 
00114   ImageIteratorWithIndex(TImage *ptr, const RegionType& region);
00115 
00118   Self &operator=(const Self& it);
00119 
00121   void Set( const PixelType & value) const  
00122     { this->m_PixelAccessor.Set(*(const_cast<InternalPixelType *>(this->m_Position)),value); }
00123 
00127   PixelType & Value(void) 
00128     { return *(const_cast<InternalPixelType *>(this->m_Position)); }
00129 
00130 protected:
00131 
00133   ImageIteratorWithIndex(const ImageConstIteratorWithIndex<TImage> & it);
00134   Self &operator=(const ImageConstIteratorWithIndex<TImage> & it);
00135 };
00137 
00138 } // end namespace itk
00139 
00140 #ifndef ITK_MANUAL_INSTANTIATION
00141 #include "itkImageIteratorWithIndex.txx"
00142 #endif
00143 
00144 #endif 
00145 

Generated at Mon Jul 12 2010 18:37:56 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000