ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
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 __itkFloodFilledSpatialFunctionConditionalConstIterator_h 00019 #define __itkFloodFilledSpatialFunctionConditionalConstIterator_h 00020 00021 #include "itkFloodFilledFunctionConditionalConstIterator.h" 00022 00023 namespace itk 00024 { 00034 template< class TImage, class TFunction > 00035 class ITK_EXPORT FloodFilledSpatialFunctionConditionalConstIterator:public FloodFilledFunctionConditionalConstIterator< 00036 TImage, TFunction > 00037 { 00038 public: 00039 00041 typedef FloodFilledSpatialFunctionConditionalConstIterator Self; 00042 typedef FloodFilledFunctionConditionalConstIterator< 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 FloodFilledSpatialFunctionConditionalConstIterator(const ImageType *imagePtr, 00075 FunctionType *fnPtr, 00076 IndexType startIndex); 00077 00081 FloodFilledSpatialFunctionConditionalConstIterator(const ImageType *imagePtr, 00082 FunctionType *fnPtr); 00083 00085 virtual ~FloodFilledSpatialFunctionConditionalConstIterator() {} 00086 00088 bool IsPixelIncluded(const IndexType & index) const; 00089 00091 void SetOriginInclusionStrategy() { m_InclusionStrategy = 0; } 00092 00094 void SetCenterInclusionStrategy() { m_InclusionStrategy = 1; } 00095 00097 void SetCompleteInclusionStrategy() { m_InclusionStrategy = 2; } 00098 00100 void SetIntersectInclusionStrategy() { m_InclusionStrategy = 3; } 00101 protected: //made protected so other iterators can access 00102 00114 unsigned char m_InclusionStrategy; 00115 }; 00116 } // end namespace itk 00117 00118 // Define instantiation macro for this template. 00119 #define ITK_TEMPLATE_FloodFilledSpatialFunctionConditionalConstIterator(_, EXPORT, TypeX, TypeY) \ 00120 namespace itk \ 00121 { \ 00122 _( 2 ( class EXPORT FloodFilledSpatialFunctionConditionalConstIterator< ITK_TEMPLATE_2 TypeX > ) ) \ 00123 namespace Templates \ 00124 { \ 00125 typedef FloodFilledSpatialFunctionConditionalConstIterator< ITK_TEMPLATE_2 TypeX > \ 00126 FloodFilledSpatialFunctionConditionalConstIterator##TypeY; \ 00127 } \ 00128 } 00129 00130 #if ITK_TEMPLATE_EXPLICIT 00131 #include "Templates/itkFloodFilledSpatialFunctionConditionalConstIterator+-.h" 00132 #endif 00133 00134 #if ITK_TEMPLATE_TXX 00135 #include "itkFloodFilledSpatialFunctionConditionalConstIterator.hxx" 00136 #endif 00137 00138 #endif 00139