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
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
00084
00085
00086
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 }
00111
00112 #ifndef ITK_MANUAL_INSTANTIATION
00113 #include "itkPathIterator.txx"
00114 #endif
00115
00116 #endif