18#ifndef itkQuadEdgeMeshBaseIterator_h
19#define itkQuadEdgeMeshBaseIterator_h
24#define itkQEDefineIteratorMethodsMacro(Op) \
25 virtual Iterator Begin##Op() { return Iterator(this, Self::Iterator::Operator##Op, true); } \
27 virtual ConstIterator Begin##Op() const { return ConstIterator(this, Self::ConstIterator::Operator##Op, true); } \
29 virtual Iterator End##Op() { return Iterator(this, Self::Iterator::Operator##Op, false); } \
31 virtual ConstIterator End##Op() const { return ConstIterator(this, Self::ConstIterator::Operator##Op, false); } \
32 ITK_MACROEND_NOOP_STATEMENT
35#define itkQEDefineIteratorGeomMethodsMacro(Op) \
36 virtual IteratorGeom BeginGeom##Op() { return IteratorGeom(this, Self::IteratorGeom::Operator##Op, true); } \
38 virtual ConstIteratorGeom BeginGeom##Op() const \
40 return ConstIteratorGeom(this, Self::ConstIteratorGeom::Operator##Op, true); \
43 virtual IteratorGeom EndGeom##Op() { return IteratorGeom(this, Self::IteratorGeom::Operator##Op, false); } \
45 virtual ConstIteratorGeom EndGeom##Op() const \
47 return ConstIteratorGeom(this, Self::ConstIteratorGeom::Operator##Op, false); \
49 ITK_MACROEND_NOOP_STATEMENT
59template <
typename TQuadEdge>
103 m_StartEdge = r.m_StartEdge;
104 m_Iterator = r.m_Iterator;
105 m_OpType = r.m_OpType;
114 return (m_StartEdge);
136 return ((m_StartEdge == r.m_StartEdge) && (m_Iterator == r.m_Iterator) && (m_OpType == r.m_OpType) &&
137 (m_Start == r.m_Start));
148 m_Start = !(m_Iterator == m_StartEdge);
160 m_Start = !(m_Iterator == m_StartEdge);
173 m_Iterator = m_Iterator->GetOnext();
176 m_Iterator = m_Iterator->GetSym();
179 m_Iterator = m_Iterator->GetLnext();
182 m_Iterator = m_Iterator->GetRnext();
185 m_Iterator = m_Iterator->GetDnext();
188 m_Iterator = m_Iterator->GetOprev();
191 m_Iterator = m_Iterator->GetLprev();
194 m_Iterator = m_Iterator->GetRprev();
197 m_Iterator = m_Iterator->GetDprev();
200 m_Iterator = m_Iterator->GetInvOnext();
203 m_Iterator = m_Iterator->GetInvLnext();
206 m_Iterator = m_Iterator->GetInvRnext();
209 m_Iterator = m_Iterator->GetInvDnext();
233template <
typename TQuadEdge>
256 return (this->m_Iterator);
261 return (this->m_Iterator);
271template <
typename TGeometricalQuadEdge>
299template <
typename TQuadEdge>
313 int op = Superclass::OperatorOnext,
335 return (this->m_Iterator);
345template <
typename TGeometricalQuadEdge>
361 int op = Superclass::OperatorOnext,
Pixel-wise addition of two images.
Base iterator class for QuadEdgeMesh.
bool operator==(const Self &r) const
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(Self)
virtual ~QuadEdgeMeshBaseIterator()=default
QuadEdgeType * GetIterator() const
QuadEdgeMeshBaseIterator(const QuadEdgeMeshBaseIterator &)=default
Self & operator=(const Self &r)
QuadEdgeType * GetStartEdge() const
QuadEdgeMeshBaseIterator(QuadEdgeType *e, int op=OperatorOnext, bool start=true)
Const geometrical iterator.
QuadEdgeMeshConstIteratorGeom(const QuadEdgeMeshConstIteratorGeom &)=default
QuadEdgeMeshConstIteratorGeom(const QuadEdgeType *e=(QuadEdgeType *) 0, int op=Superclass::OperatorOnext, bool start=true)
const OriginRefType operator*() const
Self & operator=(const NoConstType &r)
typename QuadEdgeType::OriginRefType OriginRefType
~QuadEdgeMeshConstIteratorGeom() override=default
TGeometricalQuadEdge QuadEdgeType
Const iterator for QuadEdgeMesh.
const QuadEdgeType * Value() const
Self & operator=(const NoConstType &r)
QuadEdgeMeshConstIterator(const QuadEdgeType *e=(QuadEdgeType *) 0, int op=Superclass::OperatorOnext, bool start=true)
~QuadEdgeMeshConstIterator() override=default
QuadEdgeMeshConstIterator(const QuadEdgeMeshConstIterator &)=default
Non const geometrical iterator.
QuadEdgeMeshIteratorGeom(QuadEdgeType *e=nullptr, int op=Superclass::OperatorOnext, bool start=true)
OriginRefType operator*()
QuadEdgeMeshIteratorGeom(const QuadEdgeMeshIteratorGeom &)=default
typename QuadEdgeType::OriginRefType OriginRefType
TGeometricalQuadEdge QuadEdgeType
Non const iterator for QuadMesh.
const QuadEdgeType * Value() const
QuadEdgeMeshIterator(const QuadEdgeMeshIterator &)=default
QuadEdgeMeshIterator(QuadEdgeType *e=(QuadEdgeType *) 0, int op=Superclass::OperatorOnext, bool start=true)
~QuadEdgeMeshIterator() override=default
static constexpr double e
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....