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() ) ); \ 257 inline void SetOnext(Self *onext) { this->m_Onext = onext; }
258 inline void SetRot(Self *rot) { this->m_Rot = rot; }
265 inline Self *
GetRot() {
return this->m_Rot; }
266 inline const Self *
GetOnext()
const {
return this->m_Onext; }
267 inline const Self *
GetRot()
const {
return this->m_Rot; }
290 Self *aNext = this->GetOnext();
292 Self *alpha = aNext->
GetRot();
293 Self *beta = bNext->
GetRot();
294 Self *alphaNext = alpha->
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; }
402 const Self *p2 = p1->
GetRot();
403 if ( !p2 ) {
return ITK_NULLPTR; }
404 const Self *p3 = p2->
GetRot();
405 if ( !p3 ) {
return ITK_NULLPTR; }
410 inline const Self *
GetInvOnext()
const {
return this->GetOprev(); }
411 inline const Self *
GetInvLnext()
const {
return this->GetLprev(); }
412 inline const Self *
GetInvRnext()
const {
return this->GetRprev(); }
413 inline const Self *
GetInvDnext()
const {
return this->GetDprev(); }
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
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
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
const Self * GetRot() const
const Self * GetInvRot() const
const Self * GetInvLnext() const
Const iterator for QuadEdgeMesh.
#define itkQEDefineIteratorMethodsMacro(Op)
void Splice(Self *b)
Basic quad-edge topological method.
const Self * GetInvDnext() const