00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkImageRegionReverseIterator.h,v $ 00005 Language: C++ 00006 Date: $Date: 2004/12/11 20:29:18 $ 00007 Version: $Revision: 1.15 $ 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 __itkImageRegionReverseIterator_h 00018 #define __itkImageRegionReverseIterator_h 00019 00020 #include "itkImageRegionReverseConstIterator.h" 00021 #include "itkImageConstIterator.h" 00022 00023 namespace itk 00024 { 00025 00066 template<typename TImage> 00067 class ITK_EXPORT ImageRegionReverseIterator : public ImageRegionReverseConstIterator<TImage> 00068 { 00069 public: 00071 typedef ImageRegionReverseIterator Self; 00072 typedef ImageRegionReverseConstIterator<TImage> Superclass; 00073 00075 typedef typename Superclass::IndexType IndexType; 00076 typedef typename Superclass::IndexValueType IndexValueType; 00077 typedef typename Superclass::SizeType SizeType; 00078 typedef typename Superclass::SizeValueType SizeValueType; 00079 typedef typename Superclass::OffsetType OffsetType; 00080 typedef typename Superclass::OffsetValueType OffsetValueType; 00081 typedef typename Superclass::RegionType RegionType; 00082 typedef typename Superclass::ImageType ImageType; 00083 typedef typename Superclass::PixelContainer PixelContainer; 00084 typedef typename Superclass::PixelContainerPointer PixelContainerPointer; 00085 typedef typename Superclass::InternalPixelType InternalPixelType; 00086 typedef typename Superclass::PixelType PixelType; 00087 typedef typename Superclass::AccessorType AccessorType; 00088 00089 00091 ImageRegionReverseIterator(); 00092 00095 ImageRegionReverseIterator(ImageType *ptr, const RegionType& region); 00096 00103 ImageRegionReverseIterator( const ImageConstIterator<TImage> &it); 00104 00106 void Set( const PixelType & value) const 00107 { this->m_PixelAccessor.Set(*const_cast<InternalPixelType *>((this->m_Buffer+this->m_Offset)),value); } 00108 00112 PixelType & Value(void) 00113 { return *const_cast<InternalPixelType *>((this->m_Buffer+this->m_Offset)); } 00114 00118 Self Begin(void) const; 00119 00123 Self End(void) const; 00124 00125 00126 protected: 00129 ImageRegionReverseIterator( const ImageRegionReverseConstIterator<TImage> &it); 00130 Self & operator=(const ImageRegionReverseConstIterator<TImage> & it); 00131 00132 00133 }; 00134 00135 } // end namespace itk 00136 00137 #ifndef ITK_MANUAL_INSTANTIATION 00138 #include "itkImageRegionReverseIterator.txx" 00139 #endif 00140 00141 #endif 00142 00143 00144