18#ifndef itkTriangleHelper_h
19#define itkTriangleHelper_h
30template <
typename TPo
int>
37#ifndef ITK_FUTURE_LEGACY_REMOVE
38 using CoordRepType ITK_FUTURE_DEPRECATED(
39 "ITK 6 discourages using `CoordRepType`. Please use `CoordinateType` instead!") =
CoordinateType;
44 static constexpr unsigned int PointDimension = PointType::PointDimension;
93#include "itkTriangleHelper.hxx"
A convenience class for computation of various triangle elements in 2D or 3D.
static CoordinateType Cotangent(const PointType &iA, const PointType &iB, const PointType &iC)
Compute cotangent(iA,iB,iC)
typename PointType::CoordinateType CoordinateType
static bool IsObtuse(const PointType &iA, const PointType &iB, const PointType &iC)
return true if (iA,iB,iC) forms an Obtuse angle (above 90 degrees)
static PointType ComputeBarycenter(const CoordinateType &iA1, const PointType &iP1, const CoordinateType &iA2, const PointType &iP2, const CoordinateType &iA3, const PointType &iP3)
Compute barycenter, with given weights.
static PointType ComputeGravityCenter(const PointType &iP1, const PointType &iP2, const PointType &iP3)
Compute center of mass.
static CoordinateType ComputeArea(const PointType &iP1, const PointType &iP2, const PointType &iP3)
Compute Area.
static PointType ComputeCircumCenter(const PointType &iP1, const PointType &iP2, const PointType &iP3)
Compute circum center.
static VectorType ComputeNormal(const PointType &iA, const PointType &iB, const PointType &iC)
Compute Normal vector to the triangle formed by (iA,iB,iC)
static PointType ComputeConstrainedCircumCenter(const PointType &iP1, const PointType &iP2, const PointType &iP3)
Compute circum center constrained to be inside the triangle.
typename PointType::VectorType VectorType
static CoordinateType ComputeMixedArea(const PointType &iP1, const PointType &iP2, const PointType &iP3)
static CoordinateType ComputeAngle(const PointType &iP1, const PointType &iP2, const PointType &iP3)
Compute angles (iA,iB,iC)
ImageBaseType::SpacingType VectorType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....