ITK  4.8.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 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  {
123  }
124  }
125 
127 
128 protected:
130  PointIdentifier m_PointIds[NumberOfPoints];
131 
132 private:
133  TetrahedronCell(const Self &); //purposely not implemented
134  void operator=(const Self &); //purposely not implemented
135 };
136 } // end namespace itk
137 
138 #ifndef ITK_MANUAL_INSTANTIATION
139 #include "itkTetrahedronCell.hxx"
140 #endif
141 
142 #endif
void operator=(const Self &)
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
virtual void SetPointIds(PointIdConstIterator first) override
FaceType::SelfAutoPointer FaceAutoPointer
static const unsigned int CellDimension
TriangleCell< TCellInterface > FaceType
itkCellInheritedTypedefs(TCellInterface)
virtual PointIdIterator PointIdsEnd(void) override
static const unsigned int NumberOfEdges
An abstract interface for cells.
EdgeType::SelfAutoPointer EdgeAutoPointer
virtual CellFeatureCount GetNumberOfEdges() const
VertexType::SelfAutoPointer VertexAutoPointer
virtual unsigned int GetNumberOfPoints(void) const override
static const unsigned int NumberOfFaces
virtual void MakeCopy(CellAutoPointer &) const override
virtual bool GetEdge(CellFeatureIdentifier, EdgeAutoPointer &)
virtual bool EvaluatePosition(CoordRepType *, PointsContainer *, CoordRepType *, CoordRepType[], double *, InterpolationWeightType *) override
LineCell< TCellInterface > EdgeType
virtual CellFeatureCount GetNumberOfVertices() const
static const unsigned int NumberOfVertices
virtual bool GetVertex(CellFeatureIdentifier, VertexAutoPointer &)
static T max(const T &)
PointIdentifier m_PointIds[NumberOfPoints]
TetrahedronCell represents a tetrahedron for a Mesh.
static const unsigned int NumberOfPoints
itkCellCommonTypedefs(TetrahedronCell)
virtual bool GetFace(CellFeatureIdentifier, FaceAutoPointer &)
virtual void SetPointId(int localId, PointIdentifier) override
virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const override
Represents a single vertex for a Mesh.
Definition: itkVertexCell.h:39
virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &) override
itkCellVisitMacro(Superclass::TETRAHEDRON_CELL)
virtual unsigned int GetDimension(void) const override
VertexCell< TCellInterface > VertexType
virtual CellFeatureCount GetNumberOfFaces() const
virtual PointIdIterator PointIdsBegin(void) override