18 #ifndef itkTriangleHelper_h 19 #define itkTriangleHelper_h 30 template<
typename TPo
int >
40 itkStaticConstMacro(
PointDimension,
unsigned int, PointType::PointDimension);
44 static bool IsObtuse(
const PointType & iA,
const PointType & iB,
const PointType & iC);
49 const PointType & iC);
52 static CoordRepType
Cotangent(
const PointType & iA,
54 const PointType & iC);
58 const CoordRepType & iA1,
const PointType & iP1,
59 const CoordRepType & iA2,
const PointType & iP2,
60 const CoordRepType & iA3,
const PointType & iP3);
63 static CoordRepType
ComputeAngle(
const PointType & iP1,
const PointType & iP2,
64 const PointType & iP3);
68 const PointType & iP1,
69 const PointType & iP2,
70 const PointType & iP3);
74 const PointType & iP1,
75 const PointType & iP2,
76 const PointType & iP3);
80 const PointType & iP2,
const PointType & iP3);
83 static CoordRepType
ComputeArea(
const PointType & iP1,
const PointType & iP2,
const PointType & iP3);
85 static CoordRepType
ComputeMixedArea(
const PointType& iP1,
const PointType& iP2,
const PointType &iP3 );
89 void operator=(const Self &) ITK_DELETE_FUNCTION;
93 #include "itkTriangleHelper.hxx" PointType::CoordRepType CoordRepType
static PointType ComputeConstrainedCircumCenter(const PointType &iP1, const PointType &iP2, const PointType &iP3)
Compute circum center constrained to be inside the triangle.
static PointType ComputeGravityCenter(const PointType &iP1, const PointType &iP2, const PointType &iP3)
Compute center of mass.
static CoordRepType ComputeMixedArea(const PointType &iP1, const PointType &iP2, const PointType &iP3)
static const unsigned int PointDimension
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
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 VectorType ComputeNormal(const PointType &iA, const PointType &iB, const PointType &iC)
Compute Normal vector to the triangle formed by (iA,iB,iC)
static PointType ComputeBarycenter(const CoordRepType &iA1, const PointType &iP1, const CoordRepType &iA2, const PointType &iP2, const CoordRepType &iA3, const PointType &iP3)
Compute barycenter, with given weights.
static PointType ComputeCircumCenter(const PointType &iP1, const PointType &iP2, const PointType &iP3)
Compute circum center.
A convenience class for computation of various triangle elements in 2D or 3D.
static CoordRepType Cotangent(const PointType &iA, const PointType &iB, const PointType &iC)
Compute cotangent(iA,iB,iC)
PointType::VectorType VectorType
TriangleHelper(const Self &) ITK_DELETE_FUNCTION
CrossHelper< VectorType > CrossVectorType
static CoordRepType ComputeArea(const PointType &iP1, const PointType &iP2, const PointType &iP3)
Compute Area.
static CoordRepType ComputeAngle(const PointType &iP1, const PointType &iP2, const PointType &iP3)
Compute angles (iA,iB,iC)