18 #ifndef itkQuadEdgeMesh_h
19 #define itkQuadEdgeMesh_h
50 template<
typename TPixel,
unsigned int VDimension,
51 typename TTraits = QuadEdgeMeshTraits< TPixel, VDimension, bool, bool > >
68 static constexpr
unsigned int PointDimension = Traits::PointDimension;
69 static constexpr
unsigned int MaxTopologicalDimension = Traits::MaxTopologicalDimension;
96 using CellType =
typename Superclass::CellType;
136 using QEType =
typename Traits::QEPrimal;
169 #if !defined( ITK_WRAPPING_PARSER )
182 void Initialize()
override;
185 virtual void Clear();
190 { m_EdgeCellsContainer = edgeCells; }
192 { m_EdgeCellsContainer->InsertElement( cellId, cellPointer.ReleaseOwnership() ); }
205 void SqueezePointsIds();
210 #if !defined( ITK_WRAPPING_PARSER )
292 std::set< CellIdentifier > *cellSet)
304 std::set< CellIdentifier > * itkNotUsed(cellSet))
324 void SetCell(CellIdentifier cId, CellAutoPointer & cell);
327 virtual PointIdentifier FindFirstUnusedPointIndex();
329 virtual CellIdentifier FindFirstUnusedCellIndex();
331 virtual void PushOnContainer(EdgeCellType *newEdge);
334 virtual PointIdentifier AddPoint(
const PointType & p);
337 virtual QEPrimal * AddEdge(
const PointIdentifier & orgPid,
338 const PointIdentifier & destPid);
340 virtual QEPrimal * AddEdgeWithSecurePointList(
const PointIdentifier & orgPid,
341 const PointIdentifier & destPid);
344 virtual void AddFace(QEPrimal *
e);
350 virtual QEPrimal * AddFace(
const PointIdList & points);
352 virtual QEPrimal * AddFaceWithSecurePointList(
const PointIdList & points);
354 virtual QEPrimal * AddFaceWithSecurePointList(
const PointIdList & points,
358 virtual QEPrimal * AddFaceTriangle(
const PointIdentifier & aPid,
359 const PointIdentifier & bPid,
360 const PointIdentifier & cPid);
363 virtual void DeletePoint(
const PointIdentifier & pid);
365 virtual void DeleteEdge(
const PointIdentifier & orgPid,
366 const PointIdentifier & destPid);
368 virtual void DeleteEdge(QEPrimal *
e);
370 virtual void LightWeightDeleteEdge(EdgeCellType *
e);
372 virtual void LightWeightDeleteEdge(QEPrimal *
e);
374 virtual void DeleteFace(FaceRefType faceToDelete);
379 return ( Superclass::GetPoint(pid, pt) );
382 virtual PointType GetPoint(
const PointIdentifier & pid)
const;
384 virtual VectorType GetVector(
const PointIdentifier & pid)
const;
386 virtual QEPrimal * GetEdge()
const;
388 virtual QEPrimal * GetEdge(
const CellIdentifier & eid)
const;
390 virtual QEPrimal * FindEdge(
const PointIdentifier & pid0)
const;
392 virtual QEPrimal * FindEdge(
const PointIdentifier & pid0,
393 const PointIdentifier & pid1)
const;
395 virtual EdgeCellType * FindEdgeCell(
const PointIdentifier & pid0,
396 const PointIdentifier & pid1)
const;
399 CoordRepType ComputeEdgeLength(QEPrimal *
e);
401 PointIdentifier ComputeNumberOfPoints()
const;
403 CellIdentifier ComputeNumberOfFaces()
const;
405 CellIdentifier ComputeNumberOfEdges()
const;
407 PointIdentifier Splice(QEPrimal *a, QEPrimal *b);
409 #ifdef ITK_USE_CONCEPT_CHECKING
417 while ( !this->m_FreePointIndexes.empty() )
419 this->m_FreePointIndexes.pop();
421 while ( !this->m_FreeCellIndexes.empty() )
423 this->m_FreeCellIndexes.pop();
437 virtual void ClearCellsContainer();
451 #ifndef ITK_MANUAL_INSTANTIATION
452 #include "itkQuadEdgeMesh.hxx"
CellsContainerPointer m_EdgeCellsContainer
typename Traits::VectorType VectorType
bool GetAssignedCellBoundaryIfOneExists(int dimension, CellIdentifier cellId, CellFeatureIdentifier featureId, CellAutoPointer &cellAP) const
typename Superclass::CellsContainerIterator CellsContainerIterator
typename Superclass::PointDataContainer PointDataContainer
typename Superclass::CellFeatureCount CellFeatureCount
const CellsContainer * GetEdgeCells() const
typename Superclass::CellsContainerPointer CellsContainerPointer
typename Superclass::BoundaryAssignmentsContainer BoundaryAssignmentsContainer
typename Superclass::CellTraits CellTraits
typename Superclass::CellPixelType CellPixelType
typename Superclass::CellLinksContainer CellLinksContainer
const BoundaryAssignmentsContainerPointer GetBoundaryAssignments(int dimension) const
Define numeric traits for std::vector.
BoundaryAssignmentsContainerPointer GetBoundaryAssignments(int dimension)
typename Superclass::PointIdentifier PointIdentifier
typename Superclass::PointType PointType
typename Superclass::CellAutoPointer CellAutoPointer
typename Superclass::BoundingBoxPointer BoundingBoxPointer
typename Superclass::PointsContainerIterator PointsContainerIterator
bool RemoveBoundaryAssignment(int dimension, CellIdentifier cellId, CellFeatureIdentifier featureId)
typename Superclass::BoundaryAssignmentsContainerVector BoundaryAssignmentsContainerVector
typename Superclass::BoundingBoxType BoundingBoxType
typename Traits::QEPrimal QEPrimal
static const PointIdentifier m_NoPoint
typename Superclass::CellIdentifier CellIdentifier
Implements the N-dimensional mesh structure.
typename Superclass::RegionType RegionType
void CopyInformation(const DataObject *data) override
typename Traits::VertexRefType VertexRefType
typename Traits::DualDataType DualDataType
typename Superclass::PointsContainer PointsContainer
typename Superclass::BoundaryAssignmentsContainerPointer BoundaryAssignmentsContainerPointer
void SetEdgeCells(CellsContainer *edgeCells)
typename Traits::PrimalDataType PrimalDataType
CellsContainer * GetEdgeCells()
bool GetCellBoundaryFeature(int dimension, CellIdentifier cellId, CellFeatureIdentifier featureId, CellAutoPointer &cellAP) const
void SetBoundaryAssignment(int dimension, CellIdentifier cellId, CellFeatureIdentifier featureId, CellIdentifier boundaryId)
FreePointIndexesType m_FreePointIndexes
typename Superclass::CellFeatureIdentifier CellFeatureIdentifier
void SetEdgeCell(CellIdentifier cellId, CellAutoPointer &cellPointer)
bool GetPoint(PointIdentifier pid, PointType *pt) const
typename Superclass::CellMultiVisitorType CellMultiVisitorType
typename Superclass::PointDataContainerPointer PointDataContainerPointer
typename Traits::QEPrimal QEType
typename Superclass::CellDataContainer CellDataContainer
static const CellIdentifier m_NoFace
typename Traits::QEDual QEDual
typename Traits::FaceRefType FaceRefType
CellIdentifier m_NumberOfEdges
std::list< QEPrimal * > EdgeListType
CellIdentifier GetCellNeighbors(CellIdentifier, std::set< CellIdentifier > *)
typename CellTraits::PointIdInternalIterator PointIdInternalIterator
bool GetBoundaryAssignment(int dimension, CellIdentifier cellId, CellFeatureIdentifier featureId, CellIdentifier *boundaryId) const
typename Superclass::CellsContainerConstIterator CellsContainerConstIterator
typename Superclass::CellDataContainerPointer CellDataContainerPointer
typename CellsContainer::Pointer CellsContainerPointer
void SetBoundaryAssignments(int dimension, BoundaryAssignmentsContainer *container)
typename Superclass::CellLinksContainerIterator CellLinksContainerIterator
typename Superclass::PointCellLinksContainerIterator PointCellLinksContainerIterator
CellIdentifier GetCellBoundaryFeatureNeighbors(int dimension, CellIdentifier cellId, CellFeatureIdentifier featureId, std::set< CellIdentifier > *cellSet)
void ClearFreePointAndCellIndexesLists()
typename Superclass::CellLinksContainerPointer CellLinksContainerPointer
typename CellTraits::PointIdIterator PointIdIterator
typename Superclass::PointHashType PointHashType
CellIdentifier m_NumberOfFaces
static constexpr double e
The base of the natural logarithm or Euler's number
CellIdentifier GetNumberOfFaces() const
Mesh class for 2D manifolds embedded in ND space.
ImageBaseType::PointType PointType
typename Superclass::CellsContainer CellsContainer
#define itkQEDefineFrontIteratorMethodsMacro(MeshTypeArg)
typename Superclass::PointDataContainerIterator PointDataContainerIterator
typename Superclass::PointCellLinksContainer PointCellLinksContainer
std::queue< PointIdentifier > FreePointIndexesType
typename Superclass::PointsContainerConstIterator PointsContainerConstIterator
typename MeshTraits::CellIdentifier CellIdentifier
Base class for most ITK classes.
typename Superclass::PointsContainerPointer PointsContainerPointer
ImageBaseType::RegionType RegionType
typename Superclass::CellType CellType
ImageBaseType::SpacingType VectorType
typename Superclass::CoordRepType CoordRepType
CellIdentifier GetNumberOfEdges() const
typename Superclass::InterpolationWeightType InterpolationWeightType
std::vector< PointIdentifier > PointIdList
std::queue< CellIdentifier > FreeCellIndexesType
Base class for all data objects in ITK.
Class that connects the QuadEdgeMesh with the Mesh.
FreeCellIndexesType m_FreeCellIndexes
EdgeListType * EdgeListPointerType
bool RequestedRegionIsOutsideOfTheBufferedRegion() override
typename Superclass::CellDataContainerIterator CellDataContainerIterator