ITK  5.4.0
Insight Toolkit
itkTetrahedronCell.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef itkTetrahedronCell_h
19#define itkTetrahedronCell_h
20
21#include "itkTriangleCell.h"
23#include "itkMakeFilled.h"
24
25#include <array>
26
27namespace itk
28{
39template <typename TCellInterface>
40class ITK_TEMPLATE_EXPORT TetrahedronCell
41 : public TCellInterface
43{
44public:
45 ITK_DISALLOW_COPY_AND_MOVE(TetrahedronCell);
46
49 itkCellInheritedTypedefs(TCellInterface);
53 itkOverrideGetNameOfClassMacro(TetrahedronCell);
54
57 using VertexAutoPointer = typename VertexType::SelfAutoPointer;
58
61 using EdgeAutoPointer = typename EdgeType::SelfAutoPointer;
62
65 using FaceAutoPointer = typename FaceType::SelfAutoPointer;
66
68 static constexpr unsigned int NumberOfPoints = 4;
69 static constexpr unsigned int NumberOfVertices = 4;
70 static constexpr unsigned int NumberOfEdges = 6;
71 static constexpr unsigned int NumberOfFaces = 4;
72 static constexpr unsigned int CellDimension = 3;
73
74 // Standard CellInterface
75
78 GetType() const override
79 {
81 }
82 void
83 MakeCopy(CellAutoPointer &) const override;
87 unsigned int
88 GetDimension() const override;
89
91 unsigned int
92 GetNumberOfPoints() const override;
93
95 CellFeatureCount
96 GetNumberOfBoundaryFeatures(int dimension) const override;
97
101 bool
102 GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &) override;
103
107 void
108 SetPointIds(PointIdConstIterator first) override;
109
114 void
115 SetPointIds(PointIdConstIterator first, PointIdConstIterator last) override;
116
118 void
119 SetPointId(int localId, PointIdentifier) override;
120
122 PointIdIterator
123 PointIdsBegin() override;
124
126 PointIdConstIterator
127 PointIdsBegin() const override;
128
130 PointIdIterator
131 PointIdsEnd() override;
132
134 PointIdConstIterator
135 PointIdsEnd() const override;
136
137 // Tetrahedron-specific interface
138
140 virtual CellFeatureCount
142
144 virtual CellFeatureCount
146
148 virtual CellFeatureCount
150
154 virtual bool
155 GetVertex(CellFeatureIdentifier, VertexAutoPointer &);
156
160 virtual bool
161 GetEdge(CellFeatureIdentifier, EdgeAutoPointer &);
162
166 virtual bool
167 GetFace(CellFeatureIdentifier, FaceAutoPointer &);
168
171
172 bool
173 EvaluatePosition(CoordRepType *,
174 PointsContainer *,
175 CoordRepType *,
176 CoordRepType[],
177 double *,
178 InterpolationWeightType *) override;
179
180public:
181 TetrahedronCell() = default;
182
183 ~TetrahedronCell() override = default;
184
185protected:
187 std::array<PointIdentifier, NumberOfPoints> m_PointIds{ MakeFilled<std::array<PointIdentifier, NumberOfPoints>>(
189};
190} // end namespace itk
191
192#ifndef ITK_MANUAL_INSTANTIATION
193# include "itkTetrahedronCell.hxx"
194#endif
195
196#endif
Represents a line segment for a Mesh.
Definition: itkLineCell.h:46
static constexpr T max(const T &)
TetrahedronCellTopology holds data defining the topological connections of the vertices and edges of ...
TetrahedronCell represents a tetrahedron for a Mesh.
typename EdgeType::SelfAutoPointer EdgeAutoPointer
virtual bool GetEdge(CellFeatureIdentifier, EdgeAutoPointer &)
typename FaceType::SelfAutoPointer FaceAutoPointer
bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &) override
TetrahedronCell()=default
CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const override
CellGeometryEnum GetType() const override
virtual CellFeatureCount GetNumberOfEdges() const
unsigned int GetNumberOfPoints() const override
void SetPointIds(PointIdConstIterator first, PointIdConstIterator last) override
unsigned int GetDimension() const override
~TetrahedronCell() override=default
itkCellCommonTypedefs(TetrahedronCell)
virtual CellFeatureCount GetNumberOfVertices() const
void MakeCopy(CellAutoPointer &) const override
virtual bool GetVertex(CellFeatureIdentifier, VertexAutoPointer &)
void SetPointIds(PointIdConstIterator first) override
PointIdIterator PointIdsBegin() override
PointIdIterator PointIdsEnd() override
void SetPointId(int localId, PointIdentifier) override
PointIdConstIterator PointIdsEnd() const override
PointIdConstIterator PointIdsBegin() const override
virtual CellFeatureCount GetNumberOfFaces() const
itkCellInheritedTypedefs(TCellInterface)
virtual bool GetFace(CellFeatureIdentifier, FaceAutoPointer &)
itkCellVisitMacro(CellGeometryEnum::TETRAHEDRON_CELL)
typename VertexType::SelfAutoPointer VertexAutoPointer
bool EvaluatePosition(CoordRepType *, PointsContainer *, CoordRepType *, CoordRepType[], double *, InterpolationWeightType *) override
Represents a single vertex for a Mesh.
Definition: itkVertexCell.h:43
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....