|
ITK
6.0.0
Insight Toolkit
|
Go to the documentation of this file.
18 #ifndef itkShapedFloodFilledFunctionConditionalConstIterator_h
19 #define itkShapedFloodFilledFunctionConditionalConstIterator_h
42 template <
typename TImage,
typename TFunction>
87 static constexpr
unsigned int NDimensions = TImage::ImageDimension;
101 std::vector<IndexType> & startIndex);
121 InitializeIterator();
128 IsPixelIncluded(
const IndexType & index)
const override = 0;
144 return TImage::ImageDimension;
154 return m_IndexStack.front();
161 return this->m_Image->GetPixel(m_IndexStack.front());
168 return this->m_IsAtEnd;
175 m_Seeds.push_back(seed);
191 while (!m_IndexStack.empty())
196 this->m_IsAtEnd =
true;
200 for (
unsigned int i = 0; i < m_Seeds.size(); ++i)
202 if (this->m_Image->GetBufferedRegion().IsInside(m_Seeds[i]) && this->IsPixelIncluded(m_Seeds[i]))
205 m_IndexStack.push(m_Seeds[i]);
208 this->m_IsAtEnd =
false;
212 m_TempPtr->SetPixel(m_Seeds[i], 2);
238 SetFullyConnected(
const bool _arg);
241 GetFullyConnected()
const;
243 itkBooleanMacro(FullyConnected);
245 virtual const SeedsContainerType &
271 typename ImageType::SpacingType m_ImageSpacing{};
280 std::queue<IndexType> m_IndexStack{};
287 bool m_FoundUncheckedNeighbor{};
290 bool m_IsValidIndex{};
297 bool m_FullyConnected{};
302 #ifndef ITK_MANUAL_INSTANTIATION
303 # include "itkShapedFloodFilledFunctionConditionalConstIterator.hxx"
typename TImage::OffsetType OffsetType
typename TImage::IndexType IndexType
typename std::vector< IndexType > SeedsContainerType
virtual const SeedsContainerType & GetSeeds() const
ImageBaseType::PointType PointType
ImageBaseType::SizeType SizeType
void AddSeed(const IndexType seed)
typename itk::ShapedNeighborhoodIterator< ImageType > NeighborhoodIteratorType
typename TImage::RegionType RegionType
void operator++() override
ImageBaseType::IndexType IndexType
Iterates over a flood-filled spatial function with read-only access to pixels.
bool IsAtEnd() const override
ImageType::ConstWeakPointer m_Image
typename TImage::InternalPixelType InternalPixelType
ImageBaseType::RegionType RegionType
static unsigned int GetIteratorDimension()
Self & operator=(const Self &it)
const IndexType GetIndex() override
typename TImage::SizeType SizeType
virtual SmartPointer< FunctionType > GetFunction() const
typename TFunction::InputType FunctionInputType
A base class for other iterators where membership in the set of output pixels is conditional upon som...
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Templated n-dimensional image class.
const PixelType Get() const override
typename TImage::PixelType PixelType