ITK
4.13.0
Insight Segmentation and Registration Toolkit
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
ITK
Modules
Core
Common
include
itkTriangleHelper.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 itkTriangleHelper_h
19
#define itkTriangleHelper_h
20
21
#include "
itkCrossHelper.h
"
22
23
namespace
itk
24
{
30
template
<
typename
TPo
int
>
31
class
ITK_TEMPLATE_EXPORT
TriangleHelper
32
{
33
public
:
34
typedef
TriangleHelper
Self
;
35
typedef
TPoint
PointType
;
36
typedef
typename
PointType::CoordRepType
CoordRepType
;
37
typedef
typename
PointType::VectorType
VectorType
;
38
typedef
CrossHelper< VectorType >
CrossVectorType
;
39
40
itkStaticConstMacro(PointDimension,
unsigned
int
, PointType::PointDimension);
41
44
static
bool
IsObtuse(
const
PointType
& iA,
const
PointType
& iB,
const
PointType
& iC);
45
47
static
VectorType
ComputeNormal(
const
PointType
& iA,
48
const
PointType
& iB,
49
const
PointType
& iC);
50
52
static
CoordRepType
Cotangent(
const
PointType
& iA,
53
const
PointType
& iB,
54
const
PointType
& iC);
55
57
static
PointType
ComputeBarycenter(
58
const
CoordRepType
& iA1,
const
PointType
& iP1,
59
const
CoordRepType
& iA2,
const
PointType
& iP2,
60
const
CoordRepType
& iA3,
const
PointType
& iP3);
61
63
static
CoordRepType
ComputeAngle(
const
PointType
& iP1,
const
PointType
& iP2,
64
const
PointType
& iP3);
65
67
static
PointType
ComputeGravityCenter(
68
const
PointType
& iP1,
69
const
PointType
& iP2,
70
const
PointType
& iP3);
71
73
static
PointType
ComputeCircumCenter(
74
const
PointType
& iP1,
75
const
PointType
& iP2,
76
const
PointType
& iP3);
77
79
static
PointType
ComputeConstrainedCircumCenter(
const
PointType
& iP1,
80
const
PointType
& iP2,
const
PointType
& iP3);
81
83
static
CoordRepType
ComputeArea(
const
PointType
& iP1,
const
PointType
& iP2,
const
PointType
& iP3);
84
85
static
CoordRepType
ComputeMixedArea(
const
PointType
& iP1,
const
PointType
& iP2,
const
PointType
&iP3 );
86
};
87
}
88
89
#include "itkTriangleHelper.hxx"
90
#endif
itk::TriangleHelper::CoordRepType
PointType::CoordRepType CoordRepType
Definition:
itkTriangleHelper.h:36
itk::GTest::TypedefsAndConstructors::Dimension2::VectorType
ImageBaseType::SpacingType VectorType
Definition:
itkGTestTypedefsAndConstructors.h:53
itk::CrossHelper
Definition:
itkCrossHelper.h:36
itk::TriangleHelper
A convenience class for computation of various triangle elements in 2D or 3D.
Definition:
itkTriangleHelper.h:31
itk::TriangleHelper::Self
TriangleHelper Self
Definition:
itkTriangleHelper.h:34
itk::TriangleHelper::VectorType
PointType::VectorType VectorType
Definition:
itkTriangleHelper.h:37
itk::TriangleHelper::PointType
TPoint PointType
Definition:
itkTriangleHelper.h:35
itkCrossHelper.h
itk::TriangleHelper::CrossVectorType
CrossHelper< VectorType > CrossVectorType
Definition:
itkTriangleHelper.h:38
Generated on Tue Dec 19 2017 05:00:21 for ITK by
1.8.5