ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkImageReverseIterator.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkImageReverseIterator_h
00019 #define __itkImageReverseIterator_h
00020 
00021 #include "itkImageRegionReverseConstIterator.h"
00022 #include "itkImageIteratorWithIndex.h"
00023 
00024 namespace itk
00025 {
00064 template< typename TImage >
00065 class ITK_EXPORT ImageReverseIterator:public ImageRegionReverseConstIterator< TImage >
00066 {
00067 public:
00069   typedef ImageReverseIterator                      Self;
00070   typedef ImageRegionReverseConstIterator< TImage > Superclass;
00071 
00073   typedef typename Superclass::IndexType             IndexType;
00074   typedef typename Superclass::SizeType              SizeType;
00075   typedef typename Superclass::OffsetType            OffsetType;
00076   typedef typename Superclass::RegionType            RegionType;
00077   typedef typename Superclass::ImageType             ImageType;
00078   typedef typename Superclass::PixelContainer        PixelContainer;
00079   typedef typename Superclass::PixelContainerPointer PixelContainerPointer;
00080   typedef typename Superclass::InternalPixelType     InternalPixelType;
00081   typedef typename Superclass::PixelType             PixelType;
00082   typedef typename Superclass::AccessorType          AccessorType;
00083 
00085   ImageReverseIterator();
00086 
00089   ImageReverseIterator(ImageType *ptr, const RegionType & region);
00090 
00097   ImageReverseIterator(const ImageIteratorWithIndex< TImage > & it);
00098 
00100   void Set(const PixelType & value) const
00101   { this->m_PixelAccessorFunctor.Set(*const_cast< InternalPixelType * >( ( this->m_Buffer + this->m_Offset ) ), value); }
00102 
00106   PixelType & Value(void)
00107   { return *( this->m_Buffer + this->m_Offset ); }
00108 protected:
00109 
00112   ImageReverseIterator(const ImageRegionReverseConstIterator< TImage > & it);
00113   Self & operator=(const ImageRegionReverseConstIterator< TImage > & it);
00114 };
00115 } // end namespace itk
00117 
00118 #ifndef ITK_MANUAL_INSTANTIATION
00119 #include "itkImageReverseIterator.hxx"
00120 #endif
00121 
00122 #endif
00123