18#ifndef itkSparseFieldLayer_h
19#define itkSparseFieldLayer_h
36template <
typename TNodeType>
40 const TNodeType &
operator*()
const {
return *m_Pointer; }
42 const TNodeType *
operator->()
const {
return m_Pointer; }
68 m_Pointer = m_Pointer->Next;
75 m_Pointer = m_Pointer->Previous;
93template <
typename TNodeType>
114 return this->m_Pointer;
120 this->m_Pointer = this->m_Pointer->Next;
127 this->m_Pointer = this->m_Pointer->Previous;
134 this->m_Pointer =
const_cast<TNodeType *
>(sc.
GetPointer());
161template <
typename TNodeType>
206 return m_HeadNode->Next;
213 return m_HeadNode->Next;
220 m_HeadNode->Next = m_HeadNode->Next->Next;
221 m_HeadNode->Next->Previous = m_HeadNode.get();
230 n->Next = m_HeadNode->Next;
231 n->Previous = m_HeadNode.get();
232 m_HeadNode->Next->Previous = n;
233 m_HeadNode->Next = n;
242 n->Previous->Next = n->Next;
243 n->Next->Previous = n->Previous;
281 if (m_HeadNode->Next == m_HeadNode.get())
311 const std::unique_ptr<NodeType> m_HeadNode{ std::make_unique<NodeType>() };
312 unsigned int m_Size{};
316#ifndef ITK_MANUAL_INSTANTIATION
317# include "itkSparseFieldLayer.hxx"
Used to iterate through an itkSparseFieldLayer.
~ConstSparseFieldLayerIterator()=default
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(ConstSparseFieldLayerIterator)
ConstSparseFieldLayerIterator(TNodeType *p)
ConstSparseFieldLayerIterator & operator++()
const TNodeType * operator->() const
const TNodeType & operator*() const
const TNodeType * GetPointer() const
ConstSparseFieldLayerIterator()
bool operator==(const ConstSparseFieldLayerIterator o) const
ConstSparseFieldLayerIterator & operator--()
Control indentation during Print() invocation.
Light weight base class for most itk classes.
Base class for most ITK classes.
The non-const version of the ConstSparseFieldLayerIterator.
SparseFieldLayerIterator & operator--()
SparseFieldLayerIterator(TNodeType *p)
SparseFieldLayerIterator()
SparseFieldLayerIterator & operator=(Superclass &sc)
SparseFieldLayerIterator & operator++()
A very simple linked list that is used to manage nodes in a layer of a sparse field level-set solver.
~SparseFieldLayer() override=default
void PushFront(NodeType *n)
const NodeType * Front() const
RegionListType SplitRegions(int num) const
ConstIterator End() const
void PrintSelf(std::ostream &os, Indent indent) const override
ConstIterator Begin() const
std::vector< RegionType > RegionListType
unsigned int Size() const
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....