ITK  6.0.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{
35template <typename TCellInterface>
36class ITK_TEMPLATE_EXPORT TetrahedronCell
37 : public TCellInterface
39{
40public:
41 ITK_DISALLOW_COPY_AND_MOVE(TetrahedronCell);
42
45 itkCellInheritedTypedefs(TCellInterface);
49 itkOverrideGetNameOfClassMacro(TetrahedronCell);
50
53 using VertexAutoPointer = typename VertexType::SelfAutoPointer;
54
57 using EdgeAutoPointer = typename EdgeType::SelfAutoPointer;
58
61 using FaceAutoPointer = typename FaceType::SelfAutoPointer;
62
64 static constexpr unsigned int NumberOfPoints = 4;
65 static constexpr unsigned int NumberOfVertices = 4;
66 static constexpr unsigned int NumberOfEdges = 6;
67 static constexpr unsigned int NumberOfFaces = 4;
68 static constexpr unsigned int CellDimension = 3;
69
70 // Standard CellInterface
71
74 GetType() const override
75 {
77 }
78 void
79 MakeCopy(CellAutoPointer &) const override;
83 unsigned int
84 GetDimension() const override;
85
87 unsigned int
88 GetNumberOfPoints() const override;
89
91 CellFeatureCount
92 GetNumberOfBoundaryFeatures(int dimension) const override;
93
97 bool
98 GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &) override;
99
103 void
104 SetPointIds(PointIdConstIterator first) override;
105
110 void
111 SetPointIds(PointIdConstIterator first, PointIdConstIterator last) override;
112
114 void
115 SetPointId(int localId, PointIdentifier) override;
116
118 PointIdIterator
119 PointIdsBegin() override;
120
122 PointIdConstIterator
123 PointIdsBegin() const override;
124
126 PointIdIterator
127 PointIdsEnd() override;
128
130 PointIdConstIterator
131 PointIdsEnd() const override;
132
133 // Tetrahedron-specific interface
134
136 virtual CellFeatureCount
138
140 virtual CellFeatureCount
142
144 virtual CellFeatureCount
146
150 virtual bool
151 GetVertex(CellFeatureIdentifier, VertexAutoPointer &);
152
156 virtual bool
157 GetEdge(CellFeatureIdentifier, EdgeAutoPointer &);
158
162 virtual bool
163 GetFace(CellFeatureIdentifier, FaceAutoPointer &);
164
167
168 bool
169 EvaluatePosition(CoordRepType *,
170 PointsContainer *,
171 CoordRepType *,
172 CoordRepType[],
173 double *,
174 InterpolationWeightType *) override;
175
176public:
177 TetrahedronCell() = default;
178
179 ~TetrahedronCell() override = default;
180
181protected:
183 std::array<PointIdentifier, NumberOfPoints> m_PointIds{ MakeFilled<std::array<PointIdentifier, NumberOfPoints>>(
185};
186} // end namespace itk
187
188#ifndef ITK_MANUAL_INSTANTIATION
189# include "itkTetrahedronCell.hxx"
190#endif
191
192#endif
Represents a line segment for a Mesh.
Definition: itkLineCell.h:41
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:38
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....