ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkFloodFilledSpatialFunctionConditionalIterator.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkFloodFilledSpatialFunctionConditionalIterator_h
00019 #define __itkFloodFilledSpatialFunctionConditionalIterator_h
00020 
00021 #include "itkFloodFilledSpatialFunctionConditionalConstIterator.h"
00022 
00023 namespace itk
00024 {
00034 template< class TImage, class TFunction >
00035 class ITK_EXPORT FloodFilledSpatialFunctionConditionalIterator:public
00036   FloodFilledSpatialFunctionConditionalConstIterator< TImage, TFunction >
00037 {
00038 public:
00039 
00041   typedef FloodFilledSpatialFunctionConditionalIterator                           Self;
00042   typedef FloodFilledSpatialFunctionConditionalConstIterator< TImage, TFunction > Superclass;
00043 
00045   typedef typename Superclass::FunctionType FunctionType;
00046 
00048   typedef typename Superclass::FunctionInputType FunctionInputType;
00049 
00051   typedef typename Superclass::IndexType IndexType;
00052 
00054   typedef typename Superclass::SeedsContainerType SeedsContainerType;
00055 
00057   typedef typename Superclass::SizeType SizeType;
00058 
00060   typedef typename Superclass::RegionType RegionType;
00061 
00063   typedef typename Superclass::ImageType ImageType;
00064 
00066   typedef typename Superclass::InternalPixelType InternalPixelType;
00067 
00069   typedef typename Superclass::PixelType PixelType;
00070 
00074   FloodFilledSpatialFunctionConditionalIterator(ImageType *imagePtr,
00075                                                 FunctionType *fnPtr,
00076                                                 IndexType startIndex):Superclass(imagePtr, fnPtr, startIndex) {}
00077 
00081   FloodFilledSpatialFunctionConditionalIterator(ImageType *imagePtr,
00082                                                 FunctionType *fnPtr):Superclass(imagePtr, fnPtr) {}
00083 
00085   const PixelType & Get(void) const
00086   { return const_cast< ImageType * >( this->m_Image.GetPointer() )->GetPixel( this->m_IndexStack.front() ); }
00087 
00089   PixelType & Get(void)
00090   { return const_cast< ImageType * >( this->m_Image.GetPointer() )->GetPixel( this->m_IndexStack.front() ); }
00091 
00093   void Set(const PixelType & value)
00094   { const_cast< ImageType * >( this->m_Image.GetPointer() )->GetPixel( this->m_IndexStack.front() ) = value; }
00095 
00097   virtual ~FloodFilledSpatialFunctionConditionalIterator() {}
00098 };
00099 } // end namespace itk
00100 
00101 #endif
00102