ITK  6.0.0
Insight Toolkit
itkParameterizationQuadEdgeMeshFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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 itkParameterizationQuadEdgeMeshFilter_h
19#define itkParameterizationQuadEdgeMeshFilter_h
20
23
24namespace itk
25{
26
55template <typename TInputMesh, typename TOutputMesh, typename TSolverTraits>
56class ITK_TEMPLATE_EXPORT ParameterizationQuadEdgeMeshFilter
57 : public QuadEdgeMeshToQuadEdgeMeshFilter<TInputMesh, TOutputMesh>
58{
59public:
60 ITK_DISALLOW_COPY_AND_MOVE(ParameterizationQuadEdgeMeshFilter);
61
67
69 using InputMeshType = TInputMesh;
72 using InputCoordinateType = typename InputMeshType::CoordinateType;
73#ifndef ITK_FUTURE_LEGACY_REMOVE
74 using InputCoordRepType ITK_FUTURE_DEPRECATED(
75 "ITK 6 discourages using `InputCoordRepType`. Please use `InputCoordinateType` instead!") = InputCoordinateType;
76#endif
79 using InputPointIdentifier = typename InputMeshType::PointIdentifier;
80 using InputQEType = typename InputMeshType::QEType;
82 using InputEdgeListType = typename InputMeshType::EdgeListType;
83 using InputPixelType = typename InputMeshType::PixelType;
84 using InputTraits = typename InputMeshType::Traits;
86 static constexpr unsigned int InputVDimension = InputMeshType::PointDimension;
88 using InputPointsContainer = typename InputMeshType::PointsContainer;
89 using InputPointsContainerConstIterator = typename InputMeshType::PointsContainerConstIterator;
91 using InputCellsContainerConstIterator = typename InputMeshType::CellsContainerConstIterator;
92 using InputEdgeCellType = typename InputMeshType::EdgeCellType;
93 using InputPolygonCellType = typename InputMeshType::PolygonCellType;
94 using InputPointIdList = typename InputMeshType::PointIdList;
96 using InputQEIterator = typename InputQEType::IteratorGeom;
98 using InputMapPointIdentifier = std::map<InputPointIdentifier, InputPointIdentifier>;
99 using InputMapPointIdentifierIterator = typename InputMapPointIdentifier::iterator;
100
102 using OutputMeshType = TOutputMesh;
105 using OutputCoordinateType = typename OutputMeshType::CoordinateType;
106#ifndef ITK_FUTURE_LEGACY_REMOVE
107 using OutputCoordRepType ITK_FUTURE_DEPRECATED(
108 "ITK 6 discourages using `OutputCoordRepType`. Please use `OutputCoordinateType` instead!") = OutputCoordinateType;
109#endif
111 using OutputPointIdentifier = typename OutputMeshType::PointIdentifier;
112 using OutputQEType = typename OutputMeshType::QEType;
114 using OutputQEIterator = typename OutputQEType::IteratorGeom;
115 using OutputPointsContainerIterator = typename OutputMeshType::PointsContainerIterator;
117 static constexpr unsigned int OutputVDimension = OutputMeshType::PointDimension;
119 using SolverTraits = TSolverTraits;
120 using ValueType = typename SolverTraits::ValueType;
121 using MatrixType = typename SolverTraits::MatrixType;
122 using VectorType = typename SolverTraits::VectorType;
128
129public:
130 void
131 SetCoefficientsMethod(CoefficientsComputation * iMethod)
132 {
133 this->m_CoefficientsMethod = iMethod;
134 }
136 itkNewMacro(Self);
137 itkOverrideGetNameOfClassMacro(ParameterizationQuadEdgeMeshFilter);
140 itkGetModifiableObjectMacro(BorderTransform, MeshBorderTransform);
141
142protected:
144 ~ParameterizationQuadEdgeMeshFilter() override = default;
145 void
146 PrintSelf(std::ostream & os, Indent indent) const override;
148 CoefficientsComputation * m_CoefficientsMethod{};
150 MeshBorderTransformPointer m_BorderTransform{};
151
152 // first is the id of the input mesh and second is the corresponding id
153 // in m_BoundaryPtMap
154 InputMapPointIdentifier m_BoundaryPtMap{};
155
156 // first is the id of the input mesh and second is the corresponding id
157 // in m_InternalPtList
158 InputMapPointIdentifier m_InternalPtMap{};
160 std::vector<OutputPointType> m_Border{};
161
162 void
163 CopyToOutputBorder();
164
174 void
175 ComputeListOfInteriorVertices();
176
184 void
185 FillMatrix(MatrixType & iM, VectorType & ioBx, VectorType & ioBy);
186
197 void
198 SolveLinearSystems(const MatrixType & iM,
199 const VectorType & iBx,
200 const VectorType & iBy,
201 VectorType & oX,
202 VectorType & oY);
203
204 void
205 GenerateData() override;
206
207private:
208};
209} // end namespace itk
210
211#include "itkParameterizationQuadEdgeMeshFilter.hxx"
212
213#endif
Transform one border of a QuadEdgeMesh into either a circle (conformal) or a square (arclength-wise).
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
Superclass for all the matrix coefficients computation classes.
typename OutputMeshType::Pointer OutputMeshPointer
Definition: itkMeshSource.h:69
TOutputMesh OutputMeshType
Definition: itkMeshSource.h:68
typename InputMeshType::Pointer InputMeshPointer
Compute a planar parameterization of the input mesh.
typename MeshBorderTransform::Pointer MeshBorderTransformPointer
typename InputMapPointIdentifier::iterator InputMapPointIdentifierIterator
typename InputMeshType::PointsContainer InputPointsContainer
std::map< InputPointIdentifier, InputPointIdentifier > InputMapPointIdentifier
typename OutputQEPrimal::IteratorGeom OutputQEIterator
typename InputMeshType::ConstPointer InputMeshConstPointer
typename InputMeshType::PointsContainerConstIterator InputPointsContainerConstIterator
typename InputQEPrimal::IteratorGeom InputQEIterator
typename InputMeshType::PolygonCellType InputPolygonCellType
typename OutputMeshType::ConstPointer OutputMeshConstPointer
typename OutputMeshType::PointIdentifier OutputPointIdentifier
typename InputMeshType::PointIdentifier InputPointIdentifier
typename InputMeshType::CellsContainerConstIterator InputCellsContainerConstIterator
typename OutputMeshType::CoordinateType OutputCoordinateType
typename InputMeshType::PointIdList InputPointIdList
typename OutputMeshType::PointsContainerIterator OutputPointsContainerIterator
typename OutputMeshType::VectorType OutputVectorType
typename InputMeshType::EdgeCellType InputEdgeCellType
typename InputMeshType::CoordinateType InputCoordinateType
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....