ITK  4.6.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
70  { return Superclass::TETRAHEDRON_CELL; }
71  virtual void MakeCopy(CellAutoPointer &) const;
73 
74  virtual unsigned int GetDimension(void) const;
75 
76  virtual unsigned int GetNumberOfPoints(void) const;
77 
78  virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const;
79 
80  virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier,
81  CellAutoPointer &);
82  virtual void SetPointIds(PointIdConstIterator first);
83 
84  virtual void SetPointIds(PointIdConstIterator first,
85  PointIdConstIterator last);
86 
87  virtual void SetPointId(int localId, PointIdentifier);
88  virtual PointIdIterator PointIdsBegin(void);
89 
90  virtual PointIdConstIterator PointIdsBegin(void) const;
91 
92  virtual PointIdIterator PointIdsEnd(void);
93 
94  virtual PointIdConstIterator PointIdsEnd(void) const;
95 
97  virtual CellFeatureCount GetNumberOfVertices(void) const;
98 
99  virtual CellFeatureCount GetNumberOfEdges(void) const;
100 
101  virtual CellFeatureCount GetNumberOfFaces(void) 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 *);
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 CellFeatureCount GetNumberOfEdges(void) const
TetrahedronCellTopology holds data defining the topological connections of the vertices and edges of ...
virtual CellFeatureCount GetNumberOfVertices(void) const
Represents a line segment for a Mesh.
Definition: itkLineCell.h:42
virtual PointIdIterator PointIdsEnd(void)
FaceType::SelfAutoPointer FaceAutoPointer
virtual void MakeCopy(CellAutoPointer &) const
static const unsigned int CellDimension
virtual unsigned int GetNumberOfPoints(void) const
TriangleCell< TCellInterface > FaceType
virtual bool EvaluatePosition(CoordRepType *, PointsContainer *, CoordRepType *, CoordRepType[], double *, InterpolationWeightType *)
virtual CellGeometry GetType(void) const
virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const
itkCellInheritedTypedefs(TCellInterface)
static const unsigned int NumberOfEdges
An abstract interface for cells.
EdgeType::SelfAutoPointer EdgeAutoPointer
VertexType::SelfAutoPointer VertexAutoPointer
virtual PointIdIterator PointIdsBegin(void)
static const unsigned int NumberOfFaces
virtual bool GetEdge(CellFeatureIdentifier, EdgeAutoPointer &)
LineCell< TCellInterface > EdgeType
virtual unsigned int GetDimension(void) const
static const unsigned int NumberOfVertices
virtual bool GetVertex(CellFeatureIdentifier, VertexAutoPointer &)
virtual void SetPointIds(PointIdConstIterator first)
static T max(const T &)
PointIdentifier m_PointIds[NumberOfPoints]
virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &)
TetrahedronCell represents a tetrahedron for a Mesh.
static const unsigned int NumberOfPoints
itkCellCommonTypedefs(TetrahedronCell)
virtual bool GetFace(CellFeatureIdentifier, FaceAutoPointer &)
Represents a single vertex for a Mesh.
Definition: itkVertexCell.h:39
itkCellVisitMacro(Superclass::TETRAHEDRON_CELL)
virtual void SetPointId(int localId, PointIdentifier)
VertexCell< TCellInterface > VertexType
virtual CellFeatureCount GetNumberOfFaces(void) const