18 #ifndef itkQuadEdgeMesh_h
19 #define itkQuadEdgeMesh_h
21 #if !defined( ITK_LEGACY_FUTURE_REMOVE )
22 # include "vcl_cstdarg.h"
115 template<
typename TPixel,
unsigned int VDimension,
116 typename TTraits = QuadEdgeMeshTraits< TPixel, VDimension, bool, bool > >
132 itkStaticConstMacro(PointDimension,
unsigned int,
133 Traits::PointDimension);
134 itkStaticConstMacro(MaxTopologicalDimension,
unsigned int,
135 Traits::MaxTopologicalDimension);
153 itkGetStaticConstMacro(PointDimension)];
157 typedef typename Superclass::PointDataContainerPointer
159 typedef typename Superclass::PointDataContainerIterator
161 typedef typename Superclass::PointsContainerConstIterator
163 typedef typename Superclass::PointsContainerIterator
176 typedef typename Superclass::CellsContainerConstIterator
178 typedef typename Superclass::CellsContainerIterator
182 typedef typename Superclass::CellLinksContainerPointer
184 typedef typename Superclass::CellLinksContainerIterator
189 typedef typename Superclass::CellDataContainerPointer
191 typedef typename Superclass::CellDataContainerIterator
195 typedef typename Superclass::PointCellLinksContainer
197 typedef typename Superclass::PointCellLinksContainerIterator
201 typedef typename Superclass::BoundaryAssignmentsContainer
203 typedef typename Superclass::BoundaryAssignmentsContainerPointer
205 typedef typename Superclass::BoundaryAssignmentsContainerVector
212 typedef typename Superclass::InterpolationWeightType
220 typedef typename Traits::QEPrimal
QEType;
253 #if !defined( ITK_WRAPPING_PARSER )
266 virtual void Initialize() ITK_OVERRIDE;
269 virtual
void Clear();
274 { m_EdgeCellsContainer = edgeCells; }
276 { m_EdgeCellsContainer->InsertElement( cellId, cellPointer.ReleaseOwnership() ); }
285 virtual void Graft(
const DataObject *data) ITK_OVERRIDE;
289 void SqueezePointsIds();
294 #if !defined( ITK_WRAPPING_PARSER )
376 std::set< CellIdentifier > *cellSet)
388 std::set< CellIdentifier > * itkNotUsed(cellSet))
408 void SetCell(CellIdentifier cId, CellAutoPointer & cell);
411 virtual PointIdentifier FindFirstUnusedPointIndex();
413 virtual CellIdentifier FindFirstUnusedCellIndex();
415 virtual void PushOnContainer(EdgeCellType *newEdge);
418 virtual PointIdentifier AddPoint(
const PointType & p);
421 virtual QEPrimal * AddEdge(
const PointIdentifier & orgPid,
422 const PointIdentifier & destPid);
424 virtual QEPrimal * AddEdgeWithSecurePointList(
const PointIdentifier & orgPid,
425 const PointIdentifier & destPid);
428 virtual void AddFace(QEPrimal *
e);
434 virtual QEPrimal * AddFace(
const PointIdList & points);
436 virtual QEPrimal * AddFaceWithSecurePointList(
const PointIdList & points);
438 virtual QEPrimal * AddFaceWithSecurePointList(
const PointIdList & points,
442 virtual QEPrimal * AddFaceTriangle(
const PointIdentifier & aPid,
443 const PointIdentifier & bPid,
444 const PointIdentifier & cPid);
447 virtual void DeletePoint(
const PointIdentifier & pid);
449 virtual void DeleteEdge(
const PointIdentifier & orgPid,
450 const PointIdentifier & destPid);
452 virtual void DeleteEdge(QEPrimal *
e);
454 virtual void LightWeightDeleteEdge(EdgeCellType *
e);
456 virtual void LightWeightDeleteEdge(QEPrimal *
e);
458 virtual void DeleteFace(FaceRefType faceToDelete);
463 return ( Superclass::GetPoint(pid, pt) );
466 virtual PointType GetPoint(
const PointIdentifier & pid)
const;
468 virtual VectorType GetVector(
const PointIdentifier & pid)
const;
470 virtual QEPrimal * GetEdge()
const;
472 virtual QEPrimal * GetEdge(
const CellIdentifier & eid)
const;
474 virtual QEPrimal * FindEdge(
const PointIdentifier & pid0)
const;
476 virtual QEPrimal * FindEdge(
const PointIdentifier & pid0,
477 const PointIdentifier & pid1)
const;
479 virtual EdgeCellType * FindEdgeCell(
const PointIdentifier & pid0,
480 const PointIdentifier & pid1)
const;
483 CoordRepType ComputeEdgeLength(QEPrimal *
e);
485 PointIdentifier ComputeNumberOfPoints()
const;
487 CellIdentifier ComputeNumberOfFaces()
const;
489 CellIdentifier ComputeNumberOfEdges()
const;
491 PointIdentifier Splice(QEPrimal *a, QEPrimal *b);
493 #ifdef ITK_USE_CONCEPT_CHECKING
501 while ( !this->m_FreePointIndexes.empty() )
503 this->m_FreePointIndexes.pop();
505 while ( !this->m_FreeCellIndexes.empty() )
507 this->m_FreeCellIndexes.pop();
521 virtual
void ClearCellsContainer();
537 #ifndef ITK_MANUAL_INSTANTIATION
538 #include "itkQuadEdgeMesh.hxx"
bool GetAssignedCellBoundaryIfOneExists(int dimension, CellIdentifier cellId, CellFeatureIdentifier featureId, CellAutoPointer &cellAP) const
QuadEdgeMeshLineCell< CellType > EdgeCellType
MeshTraits::PointDataContainer PointDataContainer
Traits::VectorType VectorType
const CellsContainer * GetEdgeCells() const
Traits::FaceRefType FaceRefType
Superclass::CellsContainerConstIterator CellsContainerConstIterator
const BoundaryAssignmentsContainerPointer GetBoundaryAssignments(int dimension) const
Superclass::PointType PointType
Superclass::CoordRepType CoordRepType
Superclass::CellsContainerPointer CellsContainerPointer
BoundaryAssignmentsContainerPointer GetBoundaryAssignments(int dimension)
Superclass::CellDataContainerIterator CellDataContainerIterator
Traits::QEPrimal QEPrimal
MeshTraits::PointsContainer PointsContainer
bool RemoveBoundaryAssignment(int dimension, CellIdentifier cellId, CellFeatureIdentifier featureId)
virtual bool RequestedRegionIsOutsideOfTheBufferedRegion() override
MeshTraits::CellIdentifier CellIdentifier
SmartPointer< Self > Pointer
Superclass::CellAutoPointer CellAutoPointer
static const PointIdentifier m_NoPoint
Implements the N-dimensional mesh structure.
Superclass::BoundingBoxPointer BoundingBoxPointer
Superclass::CellDataContainerPointer CellDataContainerPointer
Superclass::BoundaryAssignmentsContainer BoundaryAssignmentsContainer
ImageBaseType::SpacingType VectorType
Superclass::CellLinksContainerPointer CellLinksContainerPointer
Superclass::PointHashType PointHashType
MeshTraits::CellDataContainer CellDataContainer
Superclass::CellFeatureIdentifier CellFeatureIdentifier
void SetEdgeCells(CellsContainer *edgeCells)
bool GetCellBoundaryFeature(int dimension, CellIdentifier cellId, CellFeatureIdentifier featureId, CellAutoPointer &cellAP) const
void SetBoundaryAssignment(int dimension, CellIdentifier cellId, CellFeatureIdentifier featureId, CellIdentifier boundaryId)
Superclass::CellDataContainer CellDataContainer
void SetEdgeCell(CellIdentifier cellId, CellAutoPointer &cellPointer)
bool GetPoint(PointIdentifier pid, PointType *pt) const
Superclass::PointDataContainerIterator PointDataContainerIterator
Mesh< TPixel, VDimension, Traits > Superclass
Superclass::PointDataContainer PointDataContainer
Superclass::RegionType RegionType
Superclass::BoundaryAssignmentsContainerPointer BoundaryAssignmentsContainerPointer
Superclass::BoundingBoxType BoundingBoxType
virtual void CopyInformation(const DataObject *data) override
std::queue< CellIdentifier > FreeCellIndexesType
EdgeListType * EdgeListPointerType
ImageBaseType::PointType PointType
Superclass::CellIdentifier CellIdentifier
static const CellIdentifier m_NoFace
CellTraits::PointIdInternalIterator PointIdInternalIterator
Superclass::CellLinksContainerIterator CellLinksContainerIterator
MeshTraits::PointIdentifier PointIdentifier
SmartPointer< const Self > ConstPointer
Superclass::CellTraits CellTraits
CellIdentifier GetCellNeighbors(CellIdentifier, std::set< CellIdentifier > *)
Superclass::PointCellLinksContainerIterator PointCellLinksContainerIterator
MeshTraits::CellLinksContainer CellLinksContainer
bool GetBoundaryAssignment(int dimension, CellIdentifier cellId, CellFeatureIdentifier featureId, CellIdentifier *boundaryId) const
Superclass::CellType CellType
CellsContainer::Pointer CellsContainerPointer
std::queue< PointIdentifier > FreePointIndexesType
void SetBoundaryAssignments(int dimension, BoundaryAssignmentsContainer *container)
Superclass::CellPixelType CellPixelType
MeshTraits::CellsContainer CellsContainer
Superclass::BoundaryAssignmentsContainerVector BoundaryAssignmentsContainerVector
CellIdentifier GetCellBoundaryFeatureNeighbors(int dimension, CellIdentifier cellId, CellFeatureIdentifier featureId, std::set< CellIdentifier > *cellSet)
Traits::VertexRefType VertexRefType
void ClearFreePointAndCellIndexesLists()
Superclass::PointsContainerConstIterator PointsContainerConstIterator
CellTraits::PointIdIterator PointIdIterator
Superclass::PointDataContainerPointer PointDataContainerPointer
CellIdentifier GetNumberOfFaces() const
Mesh class for 2D manifolds embedded in ND space.
QuadEdgeMeshPolygonCell< CellType > PolygonCellType
Superclass::PointsContainerIterator PointsContainerIterator
Traits::PrimalDataType PrimalDataType
Superclass::PointCellLinksContainer PointCellLinksContainer
Superclass::CellFeatureCount CellFeatureCount
std::vector< PointIdentifier > PointIdList
Superclass::CellMultiVisitorType CellMultiVisitorType
Superclass::InterpolationWeightType InterpolationWeightType
#define itkQEDefineFrontIteratorMethodsMacro(MeshTypeArg)
Traits::DualDataType DualDataType
Superclass::PointsContainer PointsContainer
Superclass::CellsContainer CellsContainer
Superclass::CellLinksContainer CellLinksContainer
static ITK_CONSTEXPR_VAR double e
The base of the natural logarithm or Euler's number
Superclass::PointIdentifier PointIdentifier
CellIdentifier GetNumberOfEdges() const
Superclass::PointsContainerPointer PointsContainerPointer
Base class for all data objects in ITK.
Class that connects the QuadEdgeMesh with the Mesh.
Superclass::CellsContainerIterator CellsContainerIterator
std::list< QEPrimal * > EdgeListType