18 #ifndef itkDelaunayConformingQuadEdgeMeshFilter_h 19 #define itkDelaunayConformingQuadEdgeMeshFilter_h 36 template<
typename TInputMesh,
typename TOutputMesh=TInputMesh >
62 itkStaticConstMacro(
InputVDimension,
unsigned int, InputMeshType::PointDimension);
114 typedef std::map< OutputEdgeCellType *, PriorityQueueItemType * >
QueueMapType;
144 inline CriterionValueType
147 OutputPointIdentifier id1 = iEdge->GetOrigin();
148 OutputPointIdentifier id2 = iEdge->GetDestination();
150 OutputPointIdentifier idA = iEdge->GetLnext()->GetDestination();
151 OutputPointIdentifier idB = iEdge->GetRnext()->GetOrigin();
153 OutputPointType pt1 = iMesh->GetPoint(id1);
154 OutputPointType pt2 = iMesh->GetPoint(id2);
155 OutputPointType ptA = iMesh->GetPoint(idA);
156 OutputPointType ptB = iMesh->GetPoint(idB);
158 OutputVectorType v1A = ptA - pt1;
159 OutputVectorType v1B = ptB - pt1;
160 OutputVectorType v2A = ptA - pt2;
161 OutputVectorType v2B = ptB - pt2;
163 OutputCoordRepType sq_norm1A = v1A * v1A;
164 OutputCoordRepType sq_norm1B = v1B * v1B;
165 OutputCoordRepType sq_norm2A = v2A * v2A;
166 OutputCoordRepType sq_norm2B = v2B * v2B;
168 CriterionValueType dotA =
static_cast< CriterionValueType
>( v1A * v2A );
169 CriterionValueType dotB =
static_cast< CriterionValueType
>( v1B * v2B );
170 CriterionValueType den =
static_cast< CriterionValueType
>( sq_norm1A * sq_norm2A );
174 dotA /= std::sqrt(den);
187 den =
static_cast< CriterionValueType
>( sq_norm1B * sq_norm2B );
191 dotB /= std::sqrt(den);
204 return ( std::acos(dotA) + std::acos(dotB) -
itk::Math::pi );
216 #include "itkDelaunayConformingQuadEdgeMeshFilter.hxx"
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
unsigned long SizeValueType
Duplicates the content of a Mesh.
Control indentation during Print() invocation.
static ITK_CONSTEXPR double pi