|
ITK
5.2.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 &
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
ImageType::PointType m_ImageOrigin
std::queue< IndexType > m_IndexStack
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()
SeedsContainerType m_Seeds
Self & operator=(const Self &it)
const IndexType GetIndex() override
typename TImage::SizeType SizeType
virtual SmartPointer< FunctionType > GetFunction() const
Define additional traits for native types such as int or float.
typename TFunction::InputType FunctionInputType
bool m_FoundUncheckedNeighbor
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....
NeighborhoodIteratorType m_NeighborhoodIterator
SmartPointer< FunctionType > m_Function
Templated n-dimensional image class.
FunctionInputType m_LocationVector
ImageType::SpacingType m_ImageSpacing
const PixelType Get() const override
typename TImage::PixelType PixelType
TTempImage::Pointer m_TempPtr