00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkFloodFilledImageFunctionConditionalIterator_h
00018 #define __itkFloodFilledImageFunctionConditionalIterator_h
00019
00020 #include "itkFloodFilledImageFunctionConditionalConstIterator.h"
00021
00022 namespace itk
00023 {
00024
00032 template<class TImage, class TFunction>
00033 class ITK_EXPORT FloodFilledImageFunctionConditionalIterator: public FloodFilledImageFunctionConditionalConstIterator<TImage, TFunction>
00034 {
00035 public:
00036
00038 typedef FloodFilledImageFunctionConditionalIterator Self;
00039 typedef FloodFilledImageFunctionConditionalConstIterator<TImage, TFunction> Superclass;
00040
00042 typedef typename Superclass::FunctionType FunctionType;
00043
00045 typedef typename Superclass::FunctionInputType FunctionInputType;
00046
00048 typedef typename Superclass::IndexType IndexType;
00049
00051 typedef typename Superclass::SizeType SizeType;
00052
00054 typedef typename Superclass::RegionType RegionType;
00055
00057 typedef typename Superclass::ImageType ImageType;
00058
00060 typedef typename Superclass::InternalPixelType InternalPixelType;
00061
00063 typedef typename Superclass::PixelType PixelType;
00064
00069 itkStaticConstMacro(NDimensions, unsigned int, Superclass::NDimensions);
00070
00074 FloodFilledImageFunctionConditionalIterator(ImageType *imagePtr,
00075 FunctionType *fnPtr,
00076 IndexType startIndex): Superclass(imagePtr, fnPtr, startIndex) {};
00077
00081 FloodFilledImageFunctionConditionalIterator(ImageType *imagePtr,
00082 FunctionType *fnPtr,
00083 std::vector<IndexType>& startIndex): Superclass(imagePtr, fnPtr, startIndex) {};
00084
00088 FloodFilledImageFunctionConditionalIterator(ImageType *imagePtr,
00089 FunctionType *fnPtr): Superclass(imagePtr, fnPtr) {};
00090
00092 const PixelType & Get(void) const
00093 { return const_cast<ImageType *>(this->m_Image.GetPointer())->GetPixel(this->m_IndexStack.front() ); }
00094
00096 void Set( const PixelType & value)
00097 { const_cast<ImageType *>(this->m_Image.GetPointer())->GetPixel(this->m_IndexStack.front() ) = value; }
00098
00100 virtual ~FloodFilledImageFunctionConditionalIterator() {};
00101 };
00102
00103 }
00104
00105 #endif
00106