18 #ifndef itkSparseFieldLayer_h
19 #define itkSparseFieldLayer_h
35 template<
typename TNodeType >
40 {
return *m_Pointer; }
50 if ( m_Pointer == o.
m_Pointer ) {
return true; }
51 else {
return false; }
56 if ( m_Pointer != o.
m_Pointer ) {
return true; }
57 else {
return false; }
62 m_Pointer = m_Pointer->Next;
68 m_Pointer = m_Pointer->Previous;
73 { m_Pointer =
nullptr; }
88 template<
typename TNodeType >
102 {
return *this->m_Pointer; }
105 {
return this->m_Pointer; }
108 {
return this->m_Pointer; }
112 this->m_Pointer = this->m_Pointer->Next;
118 this->m_Pointer = this->m_Pointer->Previous;
124 this->m_Pointer =
const_cast< TNodeType *
>( sc.
GetPointer() );
151 template<
typename TNodeType >
194 {
return m_HeadNode->Next; }
198 {
return m_HeadNode->Next; }
203 m_HeadNode->Next = m_HeadNode->Next->Next;
204 m_HeadNode->Next->Previous = m_HeadNode;
211 n->Next = m_HeadNode->Next;
212 n->Previous = m_HeadNode;
213 m_HeadNode->Next->Previous = n;
214 m_HeadNode->Next = n;
221 n->Previous->Next = n->Next;
222 n->Next->Previous = n->Previous;
228 {
return Iterator(m_HeadNode->Next); }
247 if ( m_HeadNode->Next == m_HeadNode ) {
return true; }
248 else {
return false; }
254 unsigned int Size()
const;
258 RegionListType SplitRegions(
int num)
const;
263 void PrintSelf(std::ostream & os,
Indent indent)
const override;
273 #ifndef ITK_MANUAL_INSTANTIATION
274 #include "itkSparseFieldLayer.hxx"
SparseFieldLayerIterator & operator=(Superclass &sc)
ConstSparseFieldLayerIterator()
Light weight base class for most itk classes.
SparseFieldLayerIterator & operator++()
std::vector< RegionType > RegionListType
void PushFront(NodeType *n)
bool operator!=(const ConstSparseFieldLayerIterator o) const
const TNodeType * GetPointer() const
ConstIterator Begin() const
const TNodeType * operator->() const
const TNodeType & operator*() const
The non-const version of the ConstSparseFieldLayerIterator.
SparseFieldLayerIterator()
Represent a n-dimensional size (bounds) of a n-dimensional image.
Used to iterate through an itkSparseFieldLayer.
ConstSparseFieldLayerIterator & operator--()
Control indentation during Print() invocation.
ConstIterator End() const
SparseFieldLayerIterator(TNodeType *p)
const NodeType * Front() const
Base class for most ITK classes.
A very simple linked list that is used to manage nodes in a layer of a sparse field level-set solver...
ConstSparseFieldLayerIterator & operator++()
SparseFieldLayerIterator & operator--()
ConstSparseFieldLayerIterator(TNodeType *p)
bool operator==(const ConstSparseFieldLayerIterator o) const