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

itkSmartNeighborhoodIterator.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkSmartNeighborhoodIterator.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/09/11 19:57:13 $
00007   Version:   $Revision: 1.11 $
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 __itkSmartNeighborhoodIterator_h
00018 #define __itkSmartNeighborhoodIterator_h
00019 
00020 #include "itkConstSmartNeighborhoodIterator.h"
00021 
00022 namespace itk {
00023 
00096 template<class TImage,  class TBoundaryCondition
00097                        = ZeroFluxNeumannBoundaryCondition<TImage>  >
00098 class ITK_EXPORT SmartNeighborhoodIterator
00099   :  public ConstSmartNeighborhoodIterator<TImage>
00100 {
00101 public:
00103   typedef SmartNeighborhoodIterator Self;
00104   typedef ConstSmartNeighborhoodIterator<TImage> Superclass;
00105   
00107   typedef typename Superclass::InternalPixelType InternalPixelType;
00108   typedef typename Superclass::PixelType PixelType;
00109   typedef typename Superclass::ImageType ImageType;
00110   typedef typename Superclass::RegionType RegionType;
00111   typedef typename Superclass::SizeType SizeType;
00112   typedef typename Superclass::NeighborhoodType NeighborhoodType;
00113   typedef typename Superclass::IndexType IndexType;
00114   typedef typename Superclass::OffsetType OffsetType;
00115   typedef typename Superclass::ImageBoundaryConditionPointerType
00116     ImageBoundaryConditionPointerType;
00117   typedef typename Superclass::BoundaryConditionType BoundaryConditionType;
00118   typedef typename Superclass::OffsetValueType OffsetValueType;
00119   typedef typename Superclass::Iterator Iterator;
00120     
00122   itkStaticConstMacro(Dimension, unsigned int,
00123                       Superclass::Dimension);
00124 
00126   SmartNeighborhoodIterator()
00127     : Superclass() {}
00128 
00130   SmartNeighborhoodIterator(const Self& orig)
00131     : Superclass(orig) {}
00132   
00134   Self &operator=(const Self& orig)
00135     {
00136       Superclass::operator=(orig);
00137       return *this;
00138     }
00139 
00143   SmartNeighborhoodIterator(const SizeType& radius, ImageType *ptr,
00144                             const RegionType& region)
00145     : Superclass(radius, ptr, region) {}
00146 
00149   virtual void PrintSelf(std::ostream &, Indent) const;
00150 
00152   InternalPixelType *GetCenterPointer()
00153     { return (this->operator[]((this->Size())>>1)); }
00154 
00156   virtual void SetCenterPixel(const PixelType &p)
00157     { *( this->GetCenterPointer() ) = p; }
00158 
00161   virtual void SetNeighborhood(NeighborhoodType &);
00162 
00165   virtual void SetPixel(const unsigned long i, const PixelType &v);
00166 
00169   virtual void SetPixel(const unsigned long i, const PixelType &v, bool &status);
00170 
00171 };
00172 
00173 } // namespace itk
00174 
00175 #ifndef ITK_MANUAL_INSTANTIATION
00176 #include "itkSmartNeighborhoodIterator.txx"
00177 #endif
00178 
00179 #endif 
00180 

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