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

itkReflectiveImageRegionConstIterator.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkReflectiveImageRegionConstIterator.h,v $
00005   Language:  C++
00006   Date:      $Date: 2004/12/21 22:47:30 $
00007   Version:   $Revision: 1.9 $
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 __itkReflectiveImageRegionConstIterator_h
00018 #define __itkReflectiveImageRegionConstIterator_h
00019 
00020 #include "itkImageConstIteratorWithIndex.h"
00021 
00022 namespace itk
00023 {
00024 
00051 template<typename TImage>
00052 class ITK_EXPORT ReflectiveImageRegionConstIterator : public ImageConstIteratorWithIndex<TImage>
00053 {
00054 public:
00056   typedef ReflectiveImageRegionConstIterator Self;
00057   typedef ImageConstIteratorWithIndex<TImage>  Superclass;
00058 
00063   typedef typename TImage::IndexType  IndexType;
00064 
00069   typedef TImage ImageType;
00070 
00075   typedef typename TImage::PixelContainer PixelContainer;
00076   typedef typename PixelContainer::Pointer PixelContainerPointer;
00077 
00083   typedef typename TImage::RegionType RegionType;
00084 
00087   typedef typename TImage::OffsetType           OffsetType;
00088   typedef typename OffsetType::OffsetValueType  OffsetValueType;
00089 
00091   ReflectiveImageRegionConstIterator() ;
00092 
00094   ~ReflectiveImageRegionConstIterator() {};
00095 
00098   ReflectiveImageRegionConstIterator( TImage *ptr, const RegionType& region );
00099 
00102   ReflectiveImageRegionConstIterator( const Self& it );
00103 
00104 
00112   ReflectiveImageRegionConstIterator(const ImageConstIteratorWithIndex<TImage> &it);
00113 
00116   Self &operator=(const Self& it);
00117 
00118   bool IsReflected(unsigned int) const;
00119 
00127   Self & operator++();
00128 
00130   void GoToBegin(void);
00131 
00133   bool IsAtBegin(void) const
00134   {
00135     return !this->m_Remaining;
00136   }
00137 
00140   void SetBeginOffset(const OffsetType& offset)
00141   { m_BeginOffset = offset; }
00142 
00145   void SetEndOffset(const OffsetType& offset)
00146   { m_EndOffset = offset; }
00147 
00150   OffsetType GetBeginOffset(const OffsetType& offset)
00151   { return m_BeginOffset; }
00152 
00155   OffsetType GetEndOffset(const OffsetType& offset)
00156   { return m_EndOffset; }
00157 
00159   void FillOffsets(const OffsetValueType &value);
00160 
00161 private:
00162   bool m_IsFirstPass[TImage::ImageDimension];
00163   OffsetType m_BeginOffset;
00164   OffsetType m_EndOffset;
00165   
00166 };
00167 
00168 } // end namespace itk
00169 
00170 #ifndef ITK_MANUAL_INSTANTIATION
00171 #include "itkReflectiveImageRegionConstIterator.txx"
00172 #endif
00173 
00174 #endif
00175 

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