18 #ifndef itkDiscretePrincipalCurvaturesQuadEdgeMeshFilter_h 19 #define itkDiscretePrincipalCurvaturesQuadEdgeMeshFilter_h 33 template<
typename TInputMesh,
typename TOutputMesh=TInputMesh >
66 #ifdef ITK_USE_CONCEPT_CHECKING 83 OutputMeshPointer output = this->
GetOutput();
85 OutputQEType *qe = iP.GetEdge();
90 if ( qe != ITK_NULLPTR )
92 OutputVectorType Laplace;
95 OutputQEType *qe_it = qe;
97 OutputCurvatureType area(0.), sum_theta(0.);
99 if ( qe_it != qe_it->GetOnext() )
102 OutputQEType *qe_it2;
104 OutputPointType q0, q1;
105 OutputVectorType face_normal;
107 OutputVectorType normal;
110 OutputCurvatureType temp_area;
111 OutputCoordType temp_coeff;
113 CoefficientType coefficent;
117 qe_it2 = qe_it->GetOnext();
118 q0 = output->GetPoint( qe_it->GetDestination() );
119 q1 = output->GetPoint( qe_it2->GetDestination() );
121 temp_coeff = coefficent(output, qe_it);
122 Laplace += temp_coeff * ( iP - q0 );
125 sum_theta +=
static_cast< OutputCurvatureType
>(
126 TriangleType::ComputeAngle(q0, iP, q1) );
131 face_normal = TriangleType::ComputeNormal(q0, iP, q1);
132 normal += face_normal;
136 while ( qe_it != qe );
141 Laplace *= 0.25 * area;
142 m_Mean = Laplace * normal;
151 return std::max( static_cast<OutputCurvatureType>( 0. ),
152 m_Mean * m_Mean - m_Gaussian );
Superclass::OutputCurvatureType OutputCurvatureType
OutputMeshType::QEType OutputQEType
~DiscretePrincipalCurvaturesQuadEdgeMeshFilter()
Superclass::OutputCellIdentifier OutputCellIdentifier
OutputMeshType::Pointer OutputMeshPointer
DiscreteCurvatureQuadEdgeMeshFilter< TInputMesh, TOutputMesh > Superclass
FIXME add documentation here.
Superclass::OutputCoordType OutputCoordType
virtual OutputCurvatureType ComputeDelta()
Superclass::TriangleType TriangleType
Superclass::OutputPointsContainerIterator OutputPointsContainerIterator
OutputMeshType::PointIdentifier OutputPointIdentifier
OutputCurvatureType ComputeMixedArea(OutputQEType *iQE1, OutputQEType *iQE2)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
DiscretePrincipalCurvaturesQuadEdgeMeshFilter()
Superclass::OutputPointIdentifier OutputPointIdentifier
OutputMeshType::PointType OutputPointType
void operator=(const Self &)
OutputCurvatureType m_Gaussian
DiscretePrincipalCurvaturesQuadEdgeMeshFilter Self
OutputMeshType::PointsContainerIterator OutputPointsContainerIterator
static ITK_CONSTEXPR double e
The base of the natural logarithm or Euler's number
OutputMeshType::MeshTraits OutputMeshTraits
TriangleHelper< OutputPointType > TriangleType
Superclass::InputMeshPointer InputMeshPointer
Superclass::OutputMeshPointer OutputMeshPointer
void ComputeMeanAndGaussianCurvatures(const OutputPointType &iP)
OutputMeshTraits::PixelType OutputCurvatureType
Superclass::OutputPointType OutputPointType
OutputMeshType::CellIdentifier OutputCellIdentifier
Superclass::OutputPointsContainerPointer OutputPointsContainerPointer
Superclass::OutputQEType OutputQEType
Superclass::OutputVectorType OutputVectorType
SmartPointer< Self > Pointer
OutputPointType::CoordRepType OutputCoordType
Superclass::OutputMeshTraits OutputMeshTraits
Superclass::InputMeshType InputMeshType
OutputMeshType::PointsContainerPointer OutputPointsContainerPointer
OutputMeshType * GetOutput()
SmartPointer< const Self > ConstPointer
#define itkConceptMacro(name, concept)
ConformalMatrixCoefficients< OutputMeshType > CoefficientType
OutputCurvatureType m_Mean
InputMeshType::Pointer InputMeshPointer
OutputMeshType::VectorType OutputVectorType
static ITK_CONSTEXPR double pi
TOutputMesh OutputMeshType
Superclass::OutputMeshType OutputMeshType