18 #ifndef itkFloodFilledFunctionConditionalConstIterator_h
19 #define itkFloodFilledFunctionConditionalConstIterator_h
38 template <
typename TImage,
typename TFunction>
77 static constexpr
unsigned int NDimensions = TImage::ImageDimension;
89 std::vector<IndexType> & startIndex);
109 InitializeIterator();
116 IsPixelIncluded(
const IndexType & index)
const override = 0;
127 this->m_Function = it.m_Function;
128 this->m_TemporaryPointer = it.m_TemporaryPointer;
129 this->m_Seeds = it.m_Seeds;
130 this->m_ImageOrigin = it.m_ImageOrigin;
131 this->m_ImageSpacing = it.m_ImageSpacing;
132 this->m_ImageRegion = it.m_ImageRegion;
133 this->m_IndexStack = it.m_IndexStack;
134 this->m_LocationVector = it.m_LocationVector;
135 this->m_FoundUncheckedNeighbor = it.m_FoundUncheckedNeighbor;
136 this->m_IsValidIndex = it.m_IsValidIndex;
146 return TImage::ImageDimension;
156 return m_IndexStack.front();
163 return this->m_Image->GetPixel(m_IndexStack.front());
170 return this->m_IsAtEnd;
177 m_Seeds.push_back(seed);
181 virtual const SeedsContainerType &
200 while (!m_IndexStack.empty())
205 this->m_IsAtEnd =
true;
209 for (
unsigned int i = 0; i < m_Seeds.size(); i++)
211 if (this->m_Image->GetBufferedRegion().IsInside(m_Seeds[i]) && this->IsPixelIncluded(m_Seeds[i]))
214 m_IndexStack.push(m_Seeds[i]);
217 this->m_IsAtEnd =
false;
221 m_TemporaryPointer->SetPixel(m_Seeds[i], 2);
281 #ifndef ITK_MANUAL_INSTANTIATION
282 # include "itkFloodFilledFunctionConditionalConstIterator.hxx"