00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkFloodFilledSpatialFunctionConditionalConstIterator.h,v $ 00005 Language: C++ 00006 Date: $Date: 2008-10-16 23:25:41 $ 00007 Version: $Revision: 1.9 $ 00008 00009 Copyright (c) Insight Software Consortium. All rights reserved. 00010 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 #ifndef __itkFloodFilledSpatialFunctionConditionalConstIterator_h 00018 #define __itkFloodFilledSpatialFunctionConditionalConstIterator_h 00019 00020 #include "itkFloodFilledFunctionConditionalConstIterator.h" 00021 00022 namespace itk 00023 { 00024 00032 template<class TImage, class TFunction> 00033 class ITK_EXPORT FloodFilledSpatialFunctionConditionalConstIterator: public FloodFilledFunctionConditionalConstIterator<TImage, TFunction> 00034 { 00035 public: 00036 00038 typedef FloodFilledSpatialFunctionConditionalConstIterator Self; 00039 typedef FloodFilledFunctionConditionalConstIterator<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 00068 FloodFilledSpatialFunctionConditionalConstIterator(const ImageType *imagePtr, 00069 FunctionType *fnPtr, 00070 IndexType startIndex); 00071 00075 FloodFilledSpatialFunctionConditionalConstIterator(const ImageType *imagePtr, 00076 FunctionType *fnPtr); 00077 00079 virtual ~FloodFilledSpatialFunctionConditionalConstIterator() {}; 00080 00082 bool IsPixelIncluded(const IndexType & index) const; 00083 00085 void SetOriginInclusionStrategy() { m_InclusionStrategy = 0; } 00086 00088 void SetCenterInclusionStrategy() { m_InclusionStrategy = 1; } 00089 00091 void SetCompleteInclusionStrategy() { m_InclusionStrategy = 2; } 00092 00094 void SetIntersectInclusionStrategy() { m_InclusionStrategy = 3; } 00095 00096 protected: //made protected so other iterators can access 00097 00109 unsigned char m_InclusionStrategy; 00110 00111 }; 00112 00113 } // end namespace itk 00114 00115 // Define instantiation macro for this template. 00116 #define ITK_TEMPLATE_FloodFilledSpatialFunctionConditionalConstIterator(_, EXPORT, x, y) namespace itk { \ 00117 _(2(class EXPORT FloodFilledSpatialFunctionConditionalConstIterator< ITK_TEMPLATE_2 x >)) \ 00118 namespace Templates { typedef FloodFilledSpatialFunctionConditionalConstIterator< ITK_TEMPLATE_2 x > \ 00119 FloodFilledSpatialFunctionConditionalConstIterator##y; } \ 00120 } 00121 00122 #if ITK_TEMPLATE_EXPLICIT 00123 # include "Templates/itkFloodFilledSpatialFunctionConditionalConstIterator+-.h" 00124 #endif 00125 00126 #if ITK_TEMPLATE_TXX 00127 # include "itkFloodFilledSpatialFunctionConditionalConstIterator.txx" 00128 #endif 00129 00130 #endif 00131