ITK  6.0.0
Insight Toolkit
Public Types | Public Member Functions | Static Public Attributes | Protected Attributes | Private Member Functions | List of all members
itk::TriangleCell< TCellInterface > Class Template Reference

#include <itkTriangleCell.h>

Detailed Description

template<typename TCellInterface>
class itk::TriangleCell< TCellInterface >

TriangleCell represents a triangle for a Mesh.

Template parameters for TriangleCell:

TPixelType = The type associated with a point, cell, or boundary for use in storing its data.

TCellTraits = Type information of mesh containing cell.

Examples
Examples/DataRepresentation/Mesh/MeshCellsIteration.cxx, Examples/DataRepresentation/Mesh/MeshCellVisitor.cxx, Examples/DataRepresentation/Mesh/MeshCellVisitor2.cxx, Examples/DataRepresentation/Mesh/MeshKComplex.cxx, and SphinxExamples/src/Core/Mesh/ConvertMeshToUnstructeredGrid/Code.cxx.

Definition at line 46 of file itkTriangleCell.h.

+ Inheritance diagram for itk::TriangleCell< TCellInterface >:
+ Collaboration diagram for itk::TriangleCell< TCellInterface >:

Public Types

using EdgeAutoPointer = typename EdgeType::SelfAutoPointer
 
using EdgeType = LineCell< TCellInterface >
 
using VertexAutoPointer = typename VertexType::SelfAutoPointer
 
using VertexType = VertexCell< TCellInterface >
 

Public Member Functions

CoordinateType ComputeArea (PointsContainer *)
 
PointType ComputeBarycenter (CoordinateType *, PointsContainer *)
 
PointType ComputeCenterOfGravity (PointsContainer *)
 
PointType ComputeCircumCenter (PointsContainer *)
 
bool EvaluatePosition (CoordinateType *, PointsContainer *, CoordinateType *, CoordinateType[], double *, InterpolationWeightType *) override
 
bool GetBoundaryFeature (int dimension, CellFeatureIdentifier, CellAutoPointer &) override
 
unsigned int GetDimension () const override
 
virtual bool GetEdge (CellFeatureIdentifier, EdgeAutoPointer &)
 
const char * GetNameOfClass () const override
 
CellFeatureCount GetNumberOfBoundaryFeatures (int dimension) const override
 
virtual CellFeatureCount GetNumberOfEdges () const
 
unsigned int GetNumberOfPoints () const override
 
virtual CellFeatureCount GetNumberOfVertices () const
 
virtual bool GetVertex (CellFeatureIdentifier, VertexAutoPointer &)
 
 itkCellVisitMacro (CellGeometryEnum::TRIANGLE_CELL)
 
PointIdConstIterator PointIdsBegin () const override
 
PointIdIterator PointIdsBegin () override
 
PointIdConstIterator PointIdsEnd () const override
 
PointIdIterator PointIdsEnd () override
 
void SetPointId (int localId, PointIdentifier) override
 
void SetPointIds (PointIdConstIterator first) override
 
void SetPointIds (PointIdConstIterator first, PointIdConstIterator last) override
 
 TriangleCell ()=default
 
 ~TriangleCell () override=default
 
 itkCellCommonTypedefs (TriangleCell)
 
 itkCellInheritedTypedefs (TCellInterface)
 
CellGeometryEnum GetType () const override
 
void MakeCopy (CellAutoPointer &) const override
 

Static Public Attributes

static constexpr unsigned int CellDimension = 2
 
static constexpr unsigned int NumberOfEdges = 3
 
static constexpr unsigned int NumberOfPoints = 3
 
static constexpr unsigned int NumberOfVertices = 3
 

Protected Attributes

std::array< PointIdentifier, NumberOfPointsm_PointIds
 

Private Member Functions

double DistanceToLine (PointType x, PointType p1, PointType p2, double &t, CoordinateType *closestPoint)
 
double DistanceToLine (PointType x, PointType p1, PointType p2, double &t, PointType &closestPoint)
 
- Private Member Functions inherited from itk::TriangleCellTopology
 TriangleCellTopology ()
 
virtual ~TriangleCellTopology ()
 

Additional Inherited Members

- Static Private Attributes inherited from itk::TriangleCellTopology
static const int m_Edges [3][2]
 

Member Typedef Documentation

◆ EdgeAutoPointer

template<typename TCellInterface >
using itk::TriangleCell< TCellInterface >::EdgeAutoPointer = typename EdgeType::SelfAutoPointer

Definition at line 67 of file itkTriangleCell.h.

◆ EdgeType

template<typename TCellInterface >
using itk::TriangleCell< TCellInterface >::EdgeType = LineCell<TCellInterface>

The type of boundary for this triangle's edges.

Definition at line 66 of file itkTriangleCell.h.

◆ VertexAutoPointer

template<typename TCellInterface >
using itk::TriangleCell< TCellInterface >::VertexAutoPointer = typename VertexType::SelfAutoPointer

Definition at line 63 of file itkTriangleCell.h.

◆ VertexType

template<typename TCellInterface >
using itk::TriangleCell< TCellInterface >::VertexType = VertexCell<TCellInterface>

The type of boundary for this triangle's vertices.

Definition at line 62 of file itkTriangleCell.h.

Constructor & Destructor Documentation

◆ TriangleCell()

template<typename TCellInterface >
itk::TriangleCell< TCellInterface >::TriangleCell ( )
default

◆ ~TriangleCell()

template<typename TCellInterface >
itk::TriangleCell< TCellInterface >::~TriangleCell ( )
overridedefault

Member Function Documentation

◆ ComputeArea()

template<typename TCellInterface >
CoordinateType itk::TriangleCell< TCellInterface >::ComputeArea ( PointsContainer *  )

Compute Area to a TriangleCell given a PointsContainer.

◆ ComputeBarycenter()

template<typename TCellInterface >
PointType itk::TriangleCell< TCellInterface >::ComputeBarycenter ( CoordinateType *  ,
PointsContainer *   
)

◆ ComputeCenterOfGravity()

template<typename TCellInterface >
PointType itk::TriangleCell< TCellInterface >::ComputeCenterOfGravity ( PointsContainer *  )

◆ ComputeCircumCenter()

template<typename TCellInterface >
PointType itk::TriangleCell< TCellInterface >::ComputeCircumCenter ( PointsContainer *  )

◆ DistanceToLine() [1/2]

template<typename TCellInterface >
double itk::TriangleCell< TCellInterface >::DistanceToLine ( PointType  x,
PointType  p1,
PointType  p2,
double &  t,
CoordinateType *  closestPoint 
)
private

Compute the squared distance between a point and a line segment defined by two other points. Returns the parametric coordinate t and point location on line.

◆ DistanceToLine() [2/2]

template<typename TCellInterface >
double itk::TriangleCell< TCellInterface >::DistanceToLine ( PointType  x,
PointType  p1,
PointType  p2,
double &  t,
PointType &  closestPoint 
)
private

◆ EvaluatePosition()

template<typename TCellInterface >
bool itk::TriangleCell< TCellInterface >::EvaluatePosition ( CoordinateType *  ,
PointsContainer *  ,
CoordinateType *  ,
CoordinateType  [],
double *  ,
InterpolationWeightType *   
)
override

Evaluate the position of a given point inside the cell

◆ GetBoundaryFeature()

template<typename TCellInterface >
bool itk::TriangleCell< TCellInterface >::GetBoundaryFeature ( int  dimension,
CellFeatureIdentifier  ,
CellAutoPointer &   
)
override

Get the boundary feature of the given dimension specified by the given cell feature Id. The Id can range from 0 to GetNumberOfBoundaryFeatures(dimension)-1.

◆ GetDimension()

template<typename TCellInterface >
unsigned int itk::TriangleCell< TCellInterface >::GetDimension ( ) const
override

Get the topological dimension of this cell.

◆ GetEdge()

template<typename TCellInterface >
virtual bool itk::TriangleCell< TCellInterface >::GetEdge ( CellFeatureIdentifier  ,
EdgeAutoPointer  
)
virtual

Get the edge specified by the given cell feature Id. The Id can range from 0 to GetNumberOfEdges()-1.

◆ GetNameOfClass()

template<typename TCellInterface >
const char* itk::TriangleCell< TCellInterface >::GetNameOfClass ( ) const
override

◆ GetNumberOfBoundaryFeatures()

template<typename TCellInterface >
CellFeatureCount itk::TriangleCell< TCellInterface >::GetNumberOfBoundaryFeatures ( int  dimension) const
override

Get the number of boundary features of the given dimension.

◆ GetNumberOfEdges()

template<typename TCellInterface >
virtual CellFeatureCount itk::TriangleCell< TCellInterface >::GetNumberOfEdges ( ) const
virtual

Get the number of edges defined for the triangle.

◆ GetNumberOfPoints()

template<typename TCellInterface >
unsigned int itk::TriangleCell< TCellInterface >::GetNumberOfPoints ( ) const
override

Get the number of points required to define the cell.

Examples
Examples/DataRepresentation/Mesh/MeshCellVisitor.cxx.

◆ GetNumberOfVertices()

template<typename TCellInterface >
virtual CellFeatureCount itk::TriangleCell< TCellInterface >::GetNumberOfVertices ( ) const
virtual

Get the number of vertices defining the triangle.

◆ GetType()

template<typename TCellInterface >
CellGeometryEnum itk::TriangleCell< TCellInterface >::GetType ( ) const
inlineoverride

Implement the standard CellInterface.

Definition at line 79 of file itkTriangleCell.h.

References itk::CommonEnums::TRIANGLE_CELL.

◆ GetVertex()

template<typename TCellInterface >
virtual bool itk::TriangleCell< TCellInterface >::GetVertex ( CellFeatureIdentifier  ,
VertexAutoPointer  
)
virtual

Get the vertex specified by the given cell feature Id. The Id can range from 0 to GetNumberOfVertices()-1.

◆ itkCellCommonTypedefs()

template<typename TCellInterface >
itk::TriangleCell< TCellInterface >::itkCellCommonTypedefs ( TriangleCell< TCellInterface >  )

Standard class type aliases.

◆ itkCellInheritedTypedefs()

template<typename TCellInterface >
itk::TriangleCell< TCellInterface >::itkCellInheritedTypedefs ( TCellInterface  )

Standard class type aliases.

◆ itkCellVisitMacro()

template<typename TCellInterface >
itk::TriangleCell< TCellInterface >::itkCellVisitMacro ( CellGeometryEnum::TRIANGLE_CELL  )

Cell visitor interface.

◆ MakeCopy()

template<typename TCellInterface >
void itk::TriangleCell< TCellInterface >::MakeCopy ( CellAutoPointer &  ) const
override

Implement the standard CellInterface.

◆ PointIdsBegin() [1/2]

template<typename TCellInterface >
PointIdConstIterator itk::TriangleCell< TCellInterface >::PointIdsBegin ( ) const
override

Get a const begin iterator to the list of point identifiers used by the cell.

◆ PointIdsBegin() [2/2]

template<typename TCellInterface >
PointIdIterator itk::TriangleCell< TCellInterface >::PointIdsBegin ( )
override

Get a begin iterator to the list of point identifiers used by the cell.

◆ PointIdsEnd() [1/2]

template<typename TCellInterface >
PointIdConstIterator itk::TriangleCell< TCellInterface >::PointIdsEnd ( ) const
override

Get a const end iterator to the list of point identifiers used by the cell.

◆ PointIdsEnd() [2/2]

template<typename TCellInterface >
PointIdIterator itk::TriangleCell< TCellInterface >::PointIdsEnd ( )
override

Get an end iterator to the list of point identifiers used by the cell.

◆ SetPointId()

template<typename TCellInterface >
void itk::TriangleCell< TCellInterface >::SetPointId ( int  localId,
PointIdentifier   
)
override

Set an individual point identifier in the cell.

◆ SetPointIds() [1/2]

template<typename TCellInterface >
void itk::TriangleCell< TCellInterface >::SetPointIds ( PointIdConstIterator  first)
override

Set the point id list used by the cell. It is assumed that the given iterator can be incremented and safely de-referenced enough times to get all the point ids needed by the cell.

◆ SetPointIds() [2/2]

template<typename TCellInterface >
void itk::TriangleCell< TCellInterface >::SetPointIds ( PointIdConstIterator  first,
PointIdConstIterator  last 
)
override

Set the point id list used by the cell. It is assumed that the range of iterators [first, last) contains the correct number of points needed to define the cell. The position *last is NOT referenced, so it can safely be one beyond the end of an array or other container.

Member Data Documentation

◆ CellDimension

template<typename TCellInterface >
constexpr unsigned int itk::TriangleCell< TCellInterface >::CellDimension = 2
staticconstexpr

Definition at line 73 of file itkTriangleCell.h.

◆ m_PointIds

template<typename TCellInterface >
std::array<PointIdentifier, NumberOfPoints> itk::TriangleCell< TCellInterface >::m_PointIds
protected
Initial value:
{ MakeFilled<std::array<PointIdentifier, NumberOfPoints>>(

Store the number of points needed for a triangle.

Definition at line 191 of file itkTriangleCell.h.

◆ NumberOfEdges

template<typename TCellInterface >
constexpr unsigned int itk::TriangleCell< TCellInterface >::NumberOfEdges = 3
staticconstexpr

Definition at line 72 of file itkTriangleCell.h.

◆ NumberOfPoints

template<typename TCellInterface >
constexpr unsigned int itk::TriangleCell< TCellInterface >::NumberOfPoints = 3
staticconstexpr

Triangle-specific topology numbers.

Definition at line 70 of file itkTriangleCell.h.

◆ NumberOfVertices

template<typename TCellInterface >
constexpr unsigned int itk::TriangleCell< TCellInterface >::NumberOfVertices = 3
staticconstexpr

Definition at line 71 of file itkTriangleCell.h.


The documentation for this class was generated from the following file:
itk::NumericTraits::max
static constexpr T max(const T &)
Definition: itkNumericTraits.h:169