18#ifndef itkAutomaticTopologyMeshSource_h
19#define itkAutomaticTopologyMeshSource_h
23#include <unordered_map>
110template <
typename TOutputMesh>
148 using PointHashMap = std::unordered_map<PointType, IdentifierType, StructHashFunction<PointHashType>>;
151 static constexpr unsigned int PointDimension = MeshType::PointDimension;
152 static constexpr unsigned int MaxTopologicalDimension = MeshType::MaxTopologicalDimension;
362 IdType size = identifierArray.
Size();
364 std::sort(identifierArray.begin(), identifierArray.end());
367 IdType *
id = &identifierArray[0];
372 hash = (hash << 7) | (hash >> 25);
387 IdType size1 = identifierArray1.
Size();
388 IdType size2 = identifierArray2.
Size();
395 std::sort(identifierArray1.begin(), identifierArray1.end());
396 std::sort(identifierArray2.begin(), identifierArray2.end());
398 return (identifierArray1 == identifierArray2);
421#ifndef ITK_MANUAL_INSTANTIATION
422# include "itkAutomaticTopologyMeshSource.hxx"
SizeValueType Size() const
bool operator()(Array< IdentifierType > identifierArray1, Array< IdentifierType > identifierArray2) const
IdentifierType operator()(Array< IdentifierType > identifierArray) const
Convenience class for generating meshes.
AutomaticTopologyMeshSource()
typename MeshType::PointHashType PointHashType
IdentifierType AddVertex(const CoordinateType *p0)
IdentifierType AddVertex(IdentifierType pointId0)
typename PointType::CoordRepType CoordinateType
IdentifierType AddTriangle(const PointType &p0, const PointType &p1, const PointType &p2)
IdentifierType AddPoint(const PointType &p0)
IdentifierType AddTriangle(IdentifierType pointId0, IdentifierType pointId1, IdentifierType pointId2)
IdentifierType AddVertex(const IdentifierArrayType &pointIDs)
IdentifierType AddTriangle(const CoordinateType *p0, const CoordinateType *p1, const CoordinateType *p2)
IdentifierType AddHexahedron(IdentifierType pointId0, IdentifierType pointId1, IdentifierType pointId2, IdentifierType pointId3, IdentifierType pointId4, IdentifierType pointId5, IdentifierType pointId6, IdentifierType pointId7)
IdentifierType AddHexahedron(const IdentifierArrayType &pointIDs)
IdentifierType AddLine(const IdentifierArrayType &pointIDs)
typename MeshType::PointType PointType
~AutomaticTopologyMeshSource() override=default
IdentifierType AddLine(const PointType &p0, const PointType &p1)
itk::IdentifierType IdentifierType
IdentifierType AddHexahedron(const CoordinateType *p0, const CoordinateType *p1, const CoordinateType *p2, const CoordinateType *p3, const CoordinateType *p4, const CoordinateType *p5, const CoordinateType *p6, const CoordinateType *p7)
typename MeshType::Pointer MeshPointer
IdentifierType AddQuadrilateral(const PointType &p0, const PointType &p1, const PointType &p2, const PointType &p3)
IdentifierType AddPoint(CoordinateType x0=0, CoordinateType x1=0, CoordinateType x2=0, CoordinateType x3=0, CoordinateType x4=0, CoordinateType x5=0)
IdentifierType AddVertex(const PointType &p0)
IdentifierType AddTetrahedron(const PointType &p0, const PointType &p1, const PointType &p2, const PointType &p3)
IdentifierType AddQuadrilateral(IdentifierType pointId0, IdentifierType pointId1, IdentifierType pointId2, IdentifierType pointId3)
IdentifierType AddLine(IdentifierType pointId0, IdentifierType pointId1)
IdentifierType AddHexahedron(const PointType &p0, const PointType &p1, const PointType &p2, const PointType &p3, const PointType &p4, const PointType &p5, const PointType &p6, const PointType &p7)
IdentifierType AddLine(const CoordinateType *p0, const CoordinateType *p1)
IdentifierType AddTetrahedron(IdentifierType pointId0, IdentifierType pointId1, IdentifierType pointId2, IdentifierType pointId3)
IdentifierType AddTetrahedron(const IdentifierArrayType &pointIDs)
std::unordered_map< Array< IdentifierType >, IdentifierType, IdentifierArrayHashFunction, IdentifierArrayEqualsFunction > CellHashMap
std::unordered_map< PointType, IdentifierType, StructHashFunction< PointHashType > > PointHashMap
IdentifierType AddTetrahedron(const CoordinateType *p0, const CoordinateType *p1, const CoordinateType *p2, const CoordinateType *p3)
typename CellType::CellAutoPointer CellAutoPointer
IdentifierType AddQuadrilateral(const CoordinateType *p0, const CoordinateType *p1, const CoordinateType *p2, const CoordinateType *p3)
typename MeshType::CellType CellType
IdentifierType AddPoint(const CoordinateType *p0)
void GenerateData() override
IdentifierType AddTriangle(const IdentifierArrayType &pointIDs)
IdentifierType AddQuadrilateral(const IdentifierArrayType &pointIDs)
Represents a hexahedron (cuboid) for a Mesh.
Light weight base class for most itk classes.
Represents a line segment for a Mesh.
Base class for all process objects that output mesh data.
Represents a quadrilateral for a Mesh.
TetrahedronCell represents a tetrahedron for a Mesh.
Represents a single vertex for a Mesh.
SmartPointer< Self > Pointer
ImageBaseType::PointType PointType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
SizeValueType IdentifierType