00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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
00068 template<class TImage, class TPath>
00069 class ITK_EXPORT PathIterator : public PathConstIterator<TImage, TPath>
00070 {
00071 public:
00072
00074 typedef PathIterator Self;
00075
00080 itkStaticConstMacro(ImageIteratorDimension, unsigned int,
00081 TImage::ImageDimension);
00082
00084 typedef PathConstIterator<TImage,TPath> Superclass;
00085
00087 typedef typename Superclass::IndexType IndexType;
00088 typedef typename Superclass::IndexValueType IndexValueType;
00089 typedef typename Superclass::OffsetType OffsetType;
00090 typedef typename Superclass::OffsetValueType OffsetValueType;
00091 typedef typename Superclass::SizeType SizeType;
00092 typedef typename Superclass::SizeValueType SizeValueType;
00093 typedef typename Superclass::RegionType RegionType;
00094 typedef typename Superclass::ImageType ImageType;
00095 typedef typename Superclass::PixelContainer PixelContainer;
00096 typedef typename Superclass::PixelContainerPointer PixelContainerPointer;
00097 typedef typename Superclass::InternalPixelType InternalPixelType;
00098 typedef typename Superclass::PixelType PixelType;
00099 typedef typename Superclass::AccessorType AccessorType;
00100 typedef typename Superclass::PathType PathType;
00101 typedef typename Superclass::PathInputType PathInputType;
00102 typedef typename Superclass::PathOutputType PathOutputType;
00103
00105 itkTypeMacro(PathIterator, PathConstIterator);
00106
00107
00108
00110 void Set( const PixelType & value)
00111 {
00112
00113
00114
00115
00116 const_cast<ImageType *>(this->m_Image.GetPointer())->
00117 SetPixel(this->m_CurrentImageIndex,value);
00118 }
00120
00124 PixelType & Value(void)
00125 {
00126 return this->GetImage()->GetPixel(this->m_ImageIndex);
00127 }
00128
00131 Self &operator=(const Self& it);
00132
00134 PathIterator(ImageType *imagePtr, const PathType *pathPtr);
00135
00137 virtual ~PathIterator() {};
00138 };
00139
00140 }
00141
00142 #ifndef ITK_MANUAL_INSTANTIATION
00143 #include "itkPathIterator.txx"
00144 #endif
00145
00146 #endif
00147