18 #ifndef itkQuadEdgeMeshParamMatrixCoefficients_h 19 #define itkQuadEdgeMeshParamMatrixCoefficients_h 32 template<
typename TInputMesh >
43 virtual InputCoordRepType operator()
44 (
const InputMeshType *iMesh, InputQEType *iEdge)
const = 0;
54 template<
typename TInputMesh >
69 InputCoordRepType
operator()(
const InputMeshType *itkNotUsed(iMesh),
70 InputQEType *itkNotUsed(iEdge) )
const 84 template<
typename TInputMesh >
105 InputCoordRepType
operator()(
const InputMeshType *iMesh, InputQEType *iEdge)
const 107 InputPointIdentifier id1 = iEdge->GetOrigin();
108 InputPointIdentifier id2 = iEdge->GetDestination();
111 InputPointType pt1 = iMesh->GetPoint(id1);
112 InputPointType pt2 = iMesh->GetPoint(id2);
114 InputCoordRepType oValue = 1.0 / pt1.EuclideanDistanceTo(pt2);
127 template<
typename TInputMesh >
146 InputCoordRepType
operator()(
const InputMeshType *iMesh, InputQEType *iEdge)
const 148 InputPointIdentifier id1 = iEdge->GetOrigin();
149 InputPointIdentifier id2 = iEdge->GetDestination();
150 InputPointType pt1 = iMesh->GetPoint(id1);
151 InputPointType pt2 = iMesh->GetPoint(id2);
154 InputCoordRepType oValue(0.0);
156 if ( iEdge->IsLeftSet() )
158 InputPointIdentifier idA = iEdge->GetLnext()->GetDestination();
159 InputPointType ptA = iMesh->GetPoint(idA);
162 if ( iEdge->IsRightSet() )
164 InputPointIdentifier idB = iEdge->GetRnext()->GetOrigin();
165 InputPointType ptB = iMesh->GetPoint(idB);
181 template<
typename TInputMesh >
201 InputCoordRepType
operator()(
const InputMeshType *iMesh, InputQEType *iEdge)
const 203 InputPointIdentifier id1 = iEdge->GetOrigin();
204 InputPointType pt1 = iMesh->GetPoint(id1);
207 InputPointIdentifier id2 = iEdge->GetDestination();
208 InputPointType pt2 = iMesh->GetPoint(id2);
212 if ( iEdge->IsLeftSet() )
214 InputPointIdentifier idA = iEdge->GetLnext()->GetDestination();
215 InputPointType ptA = iMesh->GetPoint(idA);
220 if ( iEdge->IsRightSet() )
222 InputPointIdentifier idB = iEdge->GetRnext()->GetOrigin();
223 InputPointType ptB = iMesh->GetPoint(idB);
227 return oValue / pt1.SquaredEuclideanDistanceTo(pt2);
238 template<
typename TInputMesh >
255 InputQEType *iEdge)
const 260 InputCoordRepType oValue = m_Lambda * conformal(iMesh, iEdge)
261 + ( 1.0 - m_Lambda ) * authalic(iMesh, iEdge);
274 template<
typename TInputMesh >
287 itkStaticConstMacro(PointDimension,
unsigned int,
288 InputPointType::PointDimension);
292 InputCoordRepType
operator()(
const InputMeshType *iMesh, InputQEType *iEdge)
const 294 InputPointIdentifier id1 = iEdge->GetOrigin();
295 InputPointIdentifier id2 = iEdge->GetDestination();
297 InputPointIdentifier idA = iEdge->GetLnext()->GetDestination();
298 InputPointIdentifier idB = iEdge->GetRnext()->GetOrigin();
300 InputPointType pt1 = iMesh->GetPoint(id1);
301 InputPointType pt2 = iMesh->GetPoint(id2);
302 InputPointType ptA = iMesh->GetPoint(idA);
303 InputPointType ptB = iMesh->GetPoint(idB);
305 InputVectorType v1A = ptA - pt1;
306 InputVectorType v1B = ptB - pt1;
307 InputVectorType v12 = pt2 - pt1;
309 InputCoordRepType L1A = v1A * v1A;
310 InputCoordRepType L1B = v1B * v1B;
311 InputCoordRepType L12 = v12 * v12;
313 InputCoordRepType L2A = pt2.SquaredEuclideanDistanceTo(ptA);
314 InputCoordRepType L2B = pt2.SquaredEuclideanDistanceTo(ptB);
318 InputCoordRepType AreaA = 0.5 * ( cross(v1A, v12).GetNorm() );
319 InputCoordRepType AreaB = 0.5 * ( cross(v1B, v12).GetNorm() );
322 oValue = ( L1A + L2A - L12 ) / AreaA + ( L1B + L2B - L12 ) / AreaB;
InputCoordRepType operator()(const InputMeshType *iMesh, InputQEType *iEdge) const
Compute a matrix filed with the inverse of the euclidian distance wherever two vertices are connected...
InputMeshType::CoordRepType InputCoordRepType
InputMeshType::PointIdentifier InputPointIdentifier
InputCoordRepType operator()(const InputMeshType *iMesh, InputQEType *iEdge) const
InputMeshType::PointType InputPointType
InputMeshType::PointType InputPointType
Compute a matrix filled by 1s wherever two vertices are connected by an edge.
MatrixCoefficients< TInputMesh > Superclass
InputMeshType::PointIdentifier InputPointIdentifier
IntrinsicMatrixCoefficients(const InputCoordRepType &iLambda)
InputMeshType::QEType InputQEType
InputCoordRepType operator()(const InputMeshType *, InputQEType *) const
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
InputMeshType::PointIdentifier InputPointIdentifier
InverseEuclideanDistanceMatrixCoefficients()
InputCoordRepType operator()(const InputMeshType *iMesh, InputQEType *iEdge) const
InputMeshType::QEType InputQEType
InputMeshType::PointType InputPointType
MatrixCoefficients< TInputMesh > Superclass
InputMeshType::VectorType InputVectorType
InputCoordRepType operator()(const InputMeshType *iMesh, InputQEType *iEdge) const
InputMeshType::QEType InputQEType
InputMeshType::CoordRepType InputCoordRepType
InputPointType::VectorType InputVectorType
static CoordRepType Cotangent(const PointType &iA, const PointType &iB, const PointType &iC)
Compute cotangent(iA,iB,iC)
InputCoordRepType m_Lambda
virtual ~MatrixCoefficients()
MatrixCoefficients< TInputMesh > Superclass
InputMeshType::QEType InputQEType
Compute a matrix filled with Authalic Coefiicients of the edge, wherever two vertices are connected w...
InputMeshType::QEType InputQEType
InputMeshType::CoordRepType InputCoordRepType
InputMeshType::CoordRepType InputCoordRepType
InputMeshType::QEType InputQEType
AuthalicMatrixCoefficients()
HarmonicMatrixCoefficients()
InputMeshType::CoordRepType InputCoordRepType
InputMeshType::CoordRepType InputCoordRepType
Compute a matrix filled with Harmonic coefficients, wherever two vertices are connected by an edge...
Compute a mtrix filled by intrinsic Coefficients of the edge, wherever two vertices are connected by ...
Define additional traits for native types such as int or float.
MatrixCoefficients< TInputMesh > Superclass
Superclass for all the matrix coefficients computation classes.
MatrixCoefficients< TInputMesh > Superclass