22 #include "ITKQuadEdgeMeshExport.h"
30 #define itkQEDebugMacro(x) \
32 std::ostringstream itkmsg; \
33 itkmsg << "Debug: In " __FILE__ ", line " << __LINE__ << "\n" \
34 << " (" << this << "): " x \
36 OutputWindowDisplayDebugText( itkmsg.str().c_str() ); \
38 #define itkQEWarningMacro(x) \
40 std::ostringstream itkmsg; \
41 itkmsg << "WARNING: In " __FILE__ ", line " << __LINE__ << "\n" \
42 << " (" << this << "): " x \
44 OutputWindowDisplayWarningText( itkmsg.str().c_str() ); \
57 #define itkQEAccessorsMacro(st, pt, dt) \
60 return ( dynamic_cast< pt * >( this->st::GetOnext() ) ); \
65 return ( dynamic_cast< dt * >( this->st::GetRot() ) ); \
70 return ( dynamic_cast< pt * >( this->st::GetSym() ) ); \
75 return ( dynamic_cast< pt * >( this->st::GetLnext() ) ); \
80 return ( dynamic_cast< pt * >( this->st::GetRnext() ) ); \
85 return ( dynamic_cast< pt * >( this->st::GetDnext() ) ); \
90 return ( dynamic_cast< pt * >( this->st::GetOprev() ) ); \
95 return ( dynamic_cast< pt * >( this->st::GetLprev() ) ); \
100 return ( dynamic_cast< pt * >( this->st::GetRprev() ) ); \
105 return ( dynamic_cast< pt * >( this->st::GetDprev() ) ); \
110 return ( dynamic_cast< dt * >( this->st::GetInvRot() ) ); \
115 return ( dynamic_cast< pt * >( this->st::GetInvOnext() ) ); \
120 return ( dynamic_cast< pt * >( this->st::GetInvLnext() ) ); \
125 return ( dynamic_cast< pt * >( this->st::GetInvRnext() ) ); \
130 return ( dynamic_cast< pt * >( this->st::GetInvDnext() ) ); \
132 const pt *GetOnext() const \
134 return ( dynamic_cast< const pt * >( this->st::GetOnext() ) ); \
137 const dt *GetRot() const \
139 return ( dynamic_cast< const dt * >( this->st::GetRot() ) ); \
142 const pt *GetSym() const \
144 return ( dynamic_cast< const pt * >( this->st::GetSym() ) ); \
147 const pt *GetLnext() const \
149 return ( dynamic_cast< const pt * >( this->st::GetLnext() ) ); \
152 const pt *GetRnext() const \
154 return ( dynamic_cast< const pt * >( this->st::GetRnext() ) ); \
157 const pt *GetDnext() const \
159 return ( dynamic_cast< const pt * >( this->st::GetDnext() ) ); \
162 const pt *GetOprev() const \
164 return ( dynamic_cast< const pt * >( this->st::GetOprev() ) ); \
167 const pt *GetLprev() const \
169 return ( dynamic_cast< const pt * >( this->st::GetLprev() ) ); \
172 const pt *GetRprev() const \
174 return ( dynamic_cast< const pt * >( this->st::GetRprev() ) ); \
177 const pt *GetDprev() const \
179 return ( dynamic_cast< const pt * >( this->st::GetDprev() ) ); \
182 const dt *GetInvRot() const \
184 return ( dynamic_cast< const dt * >( this->st::GetInvRot() ) ); \
187 const pt *GetInvOnext() const \
189 return ( dynamic_cast< const pt * >( this->st::GetInvOnext() ) ); \
192 const pt *GetInvLnext() const \
194 return ( dynamic_cast< const pt * >( this->st::GetInvLnext() ) ); \
197 const pt *GetInvRnext() const \
199 return ( dynamic_cast< const pt * >( this->st::GetInvRnext() ) ); \
202 const pt *GetInvDnext() const \
204 return ( dynamic_cast< const pt * >( this->st::GetInvDnext() ) ); \
290 Self *aNext = this->GetOnext();
298 this->SetOnext(bNext);
312 return ( this->m_Rot->m_Rot );
314 return ( this->m_Rot );
322 return ( this->m_Rot->m_Rot );
324 return ( this->m_Rot );
331 const Self * GetLnext()
const;
338 const Self * GetRnext()
const;
345 const Self * GetDnext()
const;
351 const Self * GetOprev()
const;
358 const Self * GetLprev()
const;
365 const Self * GetRprev()
const;
372 const Self * GetDprev()
const;
378 return ( this->GetRot()->GetRot()->GetRot() );
380 Self *p1 = this->GetRot();
381 if ( !p1 ) {
return ITK_NULLPTR; }
383 if ( !p2 ) {
return ITK_NULLPTR; }
385 if ( !p3 ) {
return ITK_NULLPTR; }
398 return ( this->GetRot()->GetRot()->GetRot() );
400 const Self *p1 = this->GetRot();
401 if ( !p1 ) {
return ITK_NULLPTR; }
403 if ( !p2 ) {
return ITK_NULLPTR; }
405 if ( !p3 ) {
return ITK_NULLPTR; }
416 inline bool IsHalfEdge()
const {
return ( ( m_Onext ==
this ) || ( m_Rot == ITK_NULLPTR ) ); }
417 inline bool IsIsolated()
const {
return (
this == this->GetOnext() ); }
418 bool IsEdgeInOnextRing(Self *testEdge)
const;
421 bool IsLnextGivenSizeCyclic(
const int size)
const;
423 unsigned int GetOrder()
const;
const Self * GetInvOnext() const
const Self * GetSym() const
const Self * GetOnext() const
Base class for the implementation of a quad-edge data structure as proposed in "Guibas and Stolfi 198...
const Self * GetInvRnext() const
QuadEdgeMeshIterator< Self > Iterator
void SetOnext(Self *onext)
Non const iterator for QuadMesh.
QuadEdgeMeshConstIterator< Self > ConstIterator
#define itkQEDefineIteratorMethodsMacro(Op)
const Self * GetRot() const
const Self * GetInvRot() const
const Self * GetInvLnext() const
Const iterator for QuadEdgeMesh.
void Splice(Self *b)
Basic quad-edge topological method.
const Self * GetInvDnext() const