ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkTetrahedronCell.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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  * http://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 
24 namespace itk
25 {
36 template< typename TCellInterface >
37 class ITK_TEMPLATE_EXPORT TetrahedronCell:public TCellInterface, private TetrahedronCellTopology
38 {
39 public:
42  itkCellInheritedTypedefs(TCellInterface);
44 
47 
50  typedef typename VertexType::SelfAutoPointer VertexAutoPointer;
51 
54  typedef typename EdgeType::SelfAutoPointer EdgeAutoPointer;
55 
58  typedef typename FaceType::SelfAutoPointer FaceAutoPointer;
59 
61  itkStaticConstMacro(NumberOfPoints, unsigned int, 4);
62  itkStaticConstMacro(NumberOfVertices, unsigned int, 4);
63  itkStaticConstMacro(NumberOfEdges, unsigned int, 6);
64  itkStaticConstMacro(NumberOfFaces, unsigned int, 4);
65  itkStaticConstMacro(CellDimension, unsigned int, 3);
67 
69  virtual CellGeometry GetType(void) const ITK_OVERRIDE
70  { return Superclass::TETRAHEDRON_CELL; }
71  virtual void MakeCopy(CellAutoPointer &) const ITK_OVERRIDE;
73 
74  virtual unsigned int GetDimension(void) const ITK_OVERRIDE;
75 
76  virtual unsigned int GetNumberOfPoints(void) const ITK_OVERRIDE;
77 
78  virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const ITK_OVERRIDE;
79 
80  virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier,
81  CellAutoPointer &) ITK_OVERRIDE;
82  virtual void SetPointIds(PointIdConstIterator first) ITK_OVERRIDE;
83 
84  virtual void SetPointIds(PointIdConstIterator first,
85  PointIdConstIterator last) ITK_OVERRIDE;
86 
87  virtual void SetPointId(int localId, PointIdentifier) ITK_OVERRIDE;
88  virtual PointIdIterator PointIdsBegin(void) ITK_OVERRIDE;
89 
90  virtual PointIdConstIterator PointIdsBegin(void) const ITK_OVERRIDE;
91 
92  virtual PointIdIterator PointIdsEnd(void) ITK_OVERRIDE;
93 
94  virtual PointIdConstIterator PointIdsEnd(void) const ITK_OVERRIDE;
95 
97  virtual CellFeatureCount GetNumberOfVertices() const;
98 
99  virtual CellFeatureCount GetNumberOfEdges() const;
100 
101  virtual CellFeatureCount GetNumberOfFaces() const;
102 
103  virtual bool GetVertex(CellFeatureIdentifier, VertexAutoPointer &);
104  virtual bool GetEdge(CellFeatureIdentifier, EdgeAutoPointer &);
105  virtual bool GetFace(CellFeatureIdentifier, FaceAutoPointer &);
106 
108  itkCellVisitMacro(Superclass::TETRAHEDRON_CELL);
109 
110  virtual bool EvaluatePosition(CoordRepType *,
111  PointsContainer *,
112  CoordRepType *,
113  CoordRepType[],
114  double *,
115  InterpolationWeightType *) ITK_OVERRIDE;
116 
117 public:
119  {
120  for ( PointIdentifier i = 0; i < itkGetStaticConstMacro(NumberOfPoints); i++ )
121  {
122  m_PointIds[i] = NumericTraits< PointIdentifier >::max();
123  }
124  }
125 
126  ~TetrahedronCell() ITK_OVERRIDE {}
127 
128 protected:
130  PointIdentifier m_PointIds[NumberOfPoints];
131 
132 private:
133  ITK_DISALLOW_COPY_AND_ASSIGN(TetrahedronCell);
134 };
135 } // end namespace itk
136 
137 #ifndef ITK_MANUAL_INSTANTIATION
138 #include "itkTetrahedronCell.hxx"
139 #endif
140 
141 #endif
virtual CellGeometry GetType(void) const override
TetrahedronCellTopology holds data defining the topological connections of the vertices and edges of ...
Represents a line segment for a Mesh.
Definition: itkLineCell.h:42
FaceType::SelfAutoPointer FaceAutoPointer
TriangleCell< TCellInterface > FaceType
An abstract interface for cells.
EdgeType::SelfAutoPointer EdgeAutoPointer
VertexType::SelfAutoPointer VertexAutoPointer
LineCell< TCellInterface > EdgeType
static ITK_CONSTEXPR_FUNC T max(const T &)
#define itkCellCommonTypedefs(celltype)
TetrahedronCell represents a tetrahedron for a Mesh.
Represents a single vertex for a Mesh.
Definition: itkVertexCell.h:39
#define itkCellVisitMacro(TopologyId)
#define itkCellInheritedTypedefs(superclassArg)
VertexCell< TCellInterface > VertexType