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: 2002/09/25 06:07:11 $
00007   Version:   $Revision: 1.1 $
00008 
00009   Copyright (c) 2002 Insight 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 
00025 /* \class ReflectiveImageRegionConstIterator
00026  * \brief Multi-dimensional image iterator which only walks a region.
00027  * 
00028  * ReflectiveImageRegionConstIterator is a templated class to represent a
00029  * multi-dimensional iterator. ReflectiveImageRegionConstIterator is templated
00030  * over the image type.  ReflectiveImageRegionConstIterator is constrained to
00031  * walk only within the specified region.
00032  *
00033  * ReflectiveImageRegionConstIterator will perform two passes over the image
00034  * along each dimension. It is useful for algorithms that require to 
00035  * go back and forth (once) over the data. 
00036  *
00037  * \sa DanielssonDistanceMapImageFilter
00038  *
00039  * \ingroup Iterators 
00040  */
00041 template<typename TImage>
00042 class ReflectiveImageRegionConstIterator : public ImageConstIteratorWithIndex<TImage>
00043 {
00044 public:
00046   typedef ReflectiveImageRegionConstIterator Self;
00047   typedef ImageConstIteratorWithIndex<TImage>  Superclass;
00048 
00053   typedef typename TImage::IndexType  IndexType;
00054 
00059   typedef TImage ImageType;
00060 
00065   typedef typename TImage::PixelContainer PixelContainer;
00066   typedef typename PixelContainer::Pointer PixelContainerPointer;
00067 
00073   typedef typename TImage::RegionType RegionType;
00074 
00076   ReflectiveImageRegionConstIterator() ;
00077   
00079   ~ReflectiveImageRegionConstIterator() {};
00080   
00083   ReflectiveImageRegionConstIterator(TImage *ptr,
00084                             const RegionType& region);
00085    
00086 
00093   ReflectiveImageRegionConstIterator( const ImageConstIteratorWithIndex<TImage> &it)
00094     { this->ImageConstIteratorWithIndex<TImage>::operator=(it); }
00095 
00096   bool IsReflected(unsigned int) const;
00104   Self & operator++();
00105 
00107   void GoToBegin(void);
00108 
00109 private:
00110   bool m_IsFirstPass[TImage::ImageDimension];
00111   
00112 };
00113 
00114 } // end namespace itk
00115 
00116 #ifndef ITK_MANUAL_INSTANTIATION
00117 #include "itkReflectiveImageRegionConstIterator.txx"
00118 #endif
00119 
00120 #endif

Generated at Wed Mar 12 01:13:09 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000