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:
00073 typedef PathIterator Self;
00074
00079 itkStaticConstMacro(ImageIteratorDimension, unsigned int,
00080 TImage::ImageDimension);
00081
00083 typedef PathConstIterator<TImage,TPath> Superclass;
00084
00086 typedef typename Superclass::IndexType IndexType;
00087 typedef typename Superclass::IndexValueType IndexValueType;
00088 typedef typename Superclass::OffsetType OffsetType;
00089 typedef typename Superclass::OffsetValueType OffsetValueType;
00090 typedef typename Superclass::SizeType SizeType;
00091 typedef typename Superclass::SizeValueType SizeValueType;
00092 typedef typename Superclass::RegionType RegionType;
00093 typedef typename Superclass::ImageType ImageType;
00094 typedef typename Superclass::PixelContainer PixelContainer;
00095 typedef typename Superclass::PixelContainerPointer PixelContainerPointer;
00096 typedef typename Superclass::InternalPixelType InternalPixelType;
00097 typedef typename Superclass::PixelType PixelType;
00098 typedef typename Superclass::AccessorType AccessorType;
00099 typedef typename Superclass::PathType PathType;
00100 typedef typename Superclass::PathInputType PathInputType;
00101 typedef typename Superclass::PathOutputType PathOutputType;
00102
00104 itkTypeMacro(PathIterator, PathConstIterator);
00105
00106
00107
00109 void Set( const PixelType & value)
00110 {
00111
00112
00113
00114
00115 const_cast<ImageType *>(this->m_Image.GetPointer())->
00116 SetPixel(this->m_CurrentImageIndex,value);
00117 }
00118
00122 PixelType & Value(void)
00123 {
00124 return this->GetImage()->GetPixel(this->m_ImageIndex);
00125 }
00126
00129 Self &operator=(const Self& it);
00130
00132 PathIterator(ImageType *imagePtr, const PathType *pathPtr);
00133
00135 virtual ~PathIterator() {};
00136 };
00137
00138 }
00139
00140 #ifndef ITK_MANUAL_INSTANTIATION
00141 #include "itkPathIterator.txx"
00142 #endif
00143
00144 #endif