18 #ifndef itkAutomaticTopologyMeshSource_h 19 #define itkAutomaticTopologyMeshSource_h 23 #include "itksys/hash_map.hxx" 110 template<
typename TOutputMesh >
146 typedef itksys::hash_map<
153 MeshType::PointDimension);
155 MeshType::MaxTopologicalDimension);
165 IdentifierType
AddPoint(
const PointType & p0);
167 IdentifierType
AddPoint(
const CoordinateType *p0);
174 IdentifierType
AddPoint(CoordinateType x0 = 0, CoordinateType x1 = 0,
175 CoordinateType x2 = 0, CoordinateType x3 = 0,
176 CoordinateType x4 = 0, CoordinateType x5 = 0);
179 IdentifierType
AddVertex(
const IdentifierArrayType & pointIds);
181 IdentifierType
AddVertex(IdentifierType pointId0);
183 IdentifierType
AddVertex(
const PointType & p0);
185 IdentifierType
AddVertex(
const CoordinateType *p0);
191 IdentifierType
AddLine(
const IdentifierArrayType & pointIds);
194 IdentifierType pointId0, IdentifierType pointId1);
196 IdentifierType
AddLine(
const PointType & p0,
const PointType & p1);
198 IdentifierType
AddLine(
const CoordinateType *p0,
199 const CoordinateType *p1);
211 IdentifierType
AddTriangle(
const IdentifierArrayType & pointIds);
214 IdentifierType pointId0, IdentifierType pointId1,
215 IdentifierType pointId2);
217 IdentifierType
AddTriangle(
const PointType & p0,
const PointType & p1,
218 const PointType & p2);
220 IdentifierType
AddTriangle(
const CoordinateType *p0,
221 const CoordinateType *p1,
222 const CoordinateType *p2);
247 IdentifierType pointId0, IdentifierType pointId1,
248 IdentifierType pointId2, IdentifierType pointId3);
251 const PointType & p2,
const PointType & p3);
254 const CoordinateType *p1,
255 const CoordinateType *p2,
256 const CoordinateType *p3);
270 IdentifierType
AddTetrahedron(
const IdentifierArrayType & pointIds);
273 IdentifierType pointId0, IdentifierType pointId1,
274 IdentifierType pointId2, IdentifierType pointId3);
276 IdentifierType
AddTetrahedron(
const PointType & p0,
const PointType & p1,
277 const PointType & p2,
const PointType & p3);
280 const CoordinateType *p1,
281 const CoordinateType *p2,
282 const CoordinateType *p3);
312 IdentifierType
AddHexahedron(
const IdentifierArrayType & pointIds);
315 IdentifierType pointId0, IdentifierType pointId1,
316 IdentifierType pointId2, IdentifierType pointId3,
317 IdentifierType pointId4, IdentifierType pointId5,
318 IdentifierType pointId6, IdentifierType pointId7);
321 const PointType & p0,
const PointType & p1,
const PointType & p2,
322 const PointType & p3,
const PointType & p4,
const PointType & p5,
323 const PointType & p6,
const PointType & p7
327 const CoordinateType *p1,
328 const CoordinateType *p2,
329 const CoordinateType *p3,
330 const CoordinateType *p4,
331 const CoordinateType *p5,
332 const CoordinateType *p6,
333 const CoordinateType *p7);
340 typedef IdentifierType IdType;
342 IdType size = identifierArray.
Size();
344 std::sort( identifierArray.begin(), identifierArray.end() );
347 IdType *
id = &identifierArray[0];
352 hash = ( hash << 7 ) | ( hash >> 25 );
367 typedef IdentifierType IdType;
369 IdType size1 = identifierArray1.
Size();
370 IdType size2 = identifierArray2.
Size();
372 if ( size1 != size2 )
377 std::sort( identifierArray1.begin(), identifierArray1.end() );
378 std::sort( identifierArray2.begin(), identifierArray2.end() );
380 return ( identifierArray1 == identifierArray2 );
393 void operator=(
const Self &) ITK_DELETE_FUNCTION;
395 typedef itksys::hash_map<
407 #ifndef ITK_MANUAL_INSTANTIATION 408 #include "itkAutomaticTopologyMeshSource.hxx" 411 #endif // itkAutomaticTopologyMeshSource_h
~AutomaticTopologyMeshSource()
IdentifierType AddHexahedron(const IdentifierArrayType &pointIds)
IdentifierType AddPoint(const PointType &p0)
static const unsigned int PointDimension
IdentifierType AddTriangle(const IdentifierArrayType &pointIds)
Convenience class for generating meshes.
SmartPointer< const Self > ConstPointer
typedef::itk::TetrahedronCell< CellType > TetrahedronCell
MeshSource< TOutputMesh > Superclass
typedef::itk::LineCell< CellType > LineCell
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
MeshType::Pointer MeshPointer
typedef::itk::QuadrilateralCell< CellType > QuadrilateralCell
void GenerateData() override
typedef::itk::TriangleCell< CellType > TriangleCell
SmartPointer< Self > Pointer
CellHashMap m_CellsHashTable
Base class for all process objects that output mesh data.
PointType::CoordRepType CoordinateType
MeshType::PointType PointType
static const unsigned int MaxTopologicalDimension
IdentifierType operator()(Array< IdentifierType > identifierArray) const
PointHashMap m_PointsHashTable
AutomaticTopologyMeshSource Self
IdentifierType AddQuadrilateral(const IdentifierArrayType &pointIds)
itksys::hash_map< PointType, IdentifierType, StructHashFunction< PointHashType > > PointHashMap
IdentifierType AddLine(const IdentifierArrayType &pointIds)
void operator=(const Self &) ITK_DELETE_FUNCTION
CellType::CellAutoPointer CellAutoPointer
typedef::itk::HexahedronCell< CellType > HexahedronCell
typedef::itk::VertexCell< CellType > VertexCell
bool operator()(Array< IdentifierType > identifierArray1, Array< IdentifierType > identifierArray2) const
SizeValueType Size(void) const
MeshType::CellType CellType
Generic hash function for an arbitrary struct (or class).
MeshType::PointHashType PointHashType
IdentifierType AddTetrahedron(const IdentifierArrayType &pointIds)
unsigned long IdentifierType
itksys::hash_map< Array< IdentifierType >, IdentifierType, IdentifierArrayHashFunction, IdentifierArrayEqualsFunction > CellHashMap
Array< IdentifierType > IdentifierArrayType
::itk::IdentifierType IdentifierType
AutomaticTopologyMeshSource()
IdentifierType AddVertex(const IdentifierArrayType &pointIds)