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

itkNeighborhoodIterator.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkNeighborhoodIterator.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/09/11 19:57:13 $
00007   Version:   $Revision: 1.40 $
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 __itkNeighborhoodIterator_h
00018 #define __itkNeighborhoodIterator_h
00019 
00020 #include <vector>
00021 #include <string.h>
00022 #include <iostream>
00023 #include "itkConstNeighborhoodIterator.h"
00024 
00025 namespace itk {
00026 
00190 template<class TImage>
00191 class ITK_EXPORT NeighborhoodIterator
00192   :  public ConstNeighborhoodIterator<TImage>
00193 {
00194 public:
00196   typedef NeighborhoodIterator Self;
00197   typedef ConstNeighborhoodIterator<TImage> Superclass;
00198   
00200   typedef typename Superclass::InternalPixelType InternalPixelType;
00201   typedef typename Superclass::PixelType  PixelType;
00202   typedef typename Superclass::SizeType   SizeType;
00203   typedef typename Superclass::ImageType  ImageType;
00204   typedef typename Superclass::RegionType RegionType;
00205   typedef typename Superclass::IndexType  IndexType;
00206   typedef typename Superclass::OffsetType OffsetType;
00207   typedef typename Superclass::RadiusType RadiusType;
00208   typedef typename Superclass::NeighborhoodType NeighborhoodType;
00209   typedef typename Superclass::Iterator      Iterator;
00210   typedef typename Superclass::ConstIterator ConstIterator;
00211   typedef typename Superclass::ImageBoundaryConditionPointerType
00212    ImageBoundaryConditionPointerType;
00213     
00215   NeighborhoodIterator(): Superclass() {}
00216   
00218   NeighborhoodIterator( const NeighborhoodIterator &n )
00219     : Superclass(n) {}
00220   
00222   Self &operator=(const Self& orig)
00223     {
00224       Superclass::operator=(orig);
00225       return *this;
00226     }
00227   
00230   NeighborhoodIterator(const SizeType &radius, ImageType * ptr,
00231                        const RegionType &region)
00232     : Superclass(radius, ptr, region) { }
00233 
00235   virtual void PrintSelf(std::ostream &, Indent) const;
00236 
00238   InternalPixelType *GetCenterPointer()
00239     { return (this->operator[]((this->Size())>>1)); }
00240 
00242   virtual void SetCenterPixel(const PixelType &p)
00243     { *( this->GetCenterPointer() ) = p; }
00244   
00248   virtual void SetNeighborhood(const NeighborhoodType &);
00249 
00251   virtual void SetPixel(const unsigned long i, const PixelType &v)
00252     { *(this->operator[](i)) = v; }
00253     
00254 };
00255 
00256 } // namespace itk
00257 
00258 
00259 #ifndef ITK_MANUAL_INSTANTIATION
00260 #include "itkNeighborhoodIterator.txx"
00261 #endif
00262 
00263 #endif

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