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: 2003/09/10 14:29:10 $ 00007 Version: $Revision: 1.47 $ 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 00042 template<typename TImage> 00043 class ITK_EXPORT ImageIterator : public ImageConstIterator<TImage> 00044 { 00045 public: 00047 typedef ImageIterator Self; 00048 00053 itkStaticConstMacro(ImageIteratorDimension, unsigned int, 00054 TImage::ImageDimension); 00055 00057 typedef ImageConstIterator<TImage> Superclass; 00058 00060 typedef typename Superclass::IndexType IndexType; 00061 typedef typename Superclass::IndexValueType IndexValueType; 00062 typedef typename Superclass::SizeType SizeType; 00063 typedef typename Superclass::SizeValueType SizeValueType; 00064 typedef typename Superclass::OffsetType OffsetType; 00065 typedef typename Superclass::OffsetValueType OffsetValueType; 00066 typedef typename Superclass::RegionType RegionType; 00067 typedef typename Superclass::ImageType ImageType; 00068 typedef typename Superclass::PixelContainer PixelContainer; 00069 typedef typename Superclass::PixelContainerPointer PixelContainerPointer; 00070 typedef typename Superclass::InternalPixelType InternalPixelType; 00071 typedef typename Superclass::PixelType PixelType; 00072 typedef typename Superclass::AccessorType AccessorType; 00073 00074 00077 ImageIterator(); 00078 00080 ~ImageIterator() {}; 00081 00082 00085 ImageIterator(const Self& it); 00086 00089 ImageIterator(TImage *ptr, const RegionType& region); 00090 00093 Self &operator=(const Self& it); 00094 00096 void Set( const PixelType & value) const 00097 { m_PixelAccessor.Set(*(const_cast<InternalPixelType *>(m_Buffer)+m_Offset),value); } 00098 00102 PixelType & Value(void) 00103 { return *(const_cast<InternalPixelType *>(m_Buffer)+m_Offset); } 00104 00108 Self Begin(void) const; 00109 00113 Self End(void) const; 00114 00116 ImageType * GetImage() const 00117 { return const_cast<ImageType *>( m_Image.GetPointer() ); }; 00118 00119 00120 protected: 00121 00123 ImageIterator(const ImageConstIterator<TImage> & it); 00124 Self &operator=(const ImageConstIterator<TImage> & it); 00125 }; 00126 00127 } // end namespace itk 00128 00129 #ifndef ITK_MANUAL_INSTANTIATION 00130 #include "itkImageIterator.txx" 00131 #endif 00132 00133 #endif

Generated at Sun Apr 1 02:33:51 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000