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

itkPathIterator.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkPathIterator.h,v $
00005   Language:  C++
00006   Date:      $Date: 2003/09/10 14:29:20 $
00007   Version:   $Revision: 1.3 $
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 __itkPathIterator_h
00018 #define __itkPathIterator_h
00019 
00020 #include "itkIndex.h"
00021 #include "itkImage.h"
00022 #include "itkPath.h"
00023 #include "itkPathConstIterator.h"
00024 
00025 namespace itk
00026 {
00027 
00040 template<class TImage, class TPath>
00041 class ITK_EXPORT PathIterator : public PathConstIterator<TImage, TPath>
00042 {
00043 public:
00045   typedef PathIterator Self;
00046 
00051   itkStaticConstMacro(ImageIteratorDimension, unsigned int,
00052                       TImage::ImageDimension);
00053 
00055   typedef PathConstIterator<TImage,TPath> Superclass;
00056 
00058   typedef typename Superclass::IndexType              IndexType;
00059   typedef typename Superclass::IndexValueType         IndexValueType;
00060   typedef typename Superclass::OffsetType             OffsetType;
00061   typedef typename Superclass::OffsetValueType        OffsetValueType;
00062   typedef typename Superclass::SizeType               SizeType;
00063   typedef typename Superclass::SizeValueType          SizeValueType;
00064   typedef typename Superclass::RegionType             RegionType;
00065   typedef typename Superclass::ImageType              ImageType;
00066   typedef typename Superclass::PixelContainer         PixelContainer;
00067   typedef typename Superclass::PixelContainerPointer  PixelContainerPointer;
00068   typedef typename Superclass::InternalPixelType      InternalPixelType;
00069   typedef typename Superclass::PixelType              PixelType;
00070   typedef typename Superclass::AccessorType           AccessorType;
00071   typedef typename Superclass::PathType               PathType;
00072   typedef typename Superclass::PathInputType          PathInputType;
00073   typedef typename Superclass::PathOutputType         PathOutputType;
00074 
00076   itkTypeMacro(PathIterator, PathConstIterator);
00077   
00078   
00079   
00081   void Set( const PixelType & value)
00082     {
00083     // Normally, this would just be the following:
00084     //   m_Image->SetPixel(m_CurrentImageIndex,value);
00085     // However, we don't want a warning about m_Image being a ConstPointer
00086     // in the Superclass.
00087     const_cast<ImageType *>(m_Image.GetPointer())->
00088       SetPixel(m_CurrentImageIndex,value);
00089     }
00090 
00094   PixelType & Value(void) 
00095     {
00096     return m_Image->GetPixel(m_CurrentImageIndex);
00097     }
00098 
00101   Self &operator=(const Self& it);
00102 
00104   PathIterator(ImageType *imagePtr, const PathType  *pathPtr);
00105 
00107   virtual ~PathIterator() {};
00108 };
00109 
00110 } // end namespace itk
00111 
00112 #ifndef ITK_MANUAL_INSTANTIATION
00113 #include "itkPathIterator.txx"
00114 #endif
00115 
00116 #endif 

Generated at Sun Jan 25 13:19:42 2004 for ITK by doxygen 1.3.3 written by Dimitri van Heesch, © 1997-2000