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 InputCoordRepType = typename InputMeshType::CoordRepType;
75 using InputPointIdentifier = typename InputMeshType::PointIdentifier;
76 using InputQEType = typename InputMeshType::QEType;
78 using InputEdgeListType = typename InputMeshType::EdgeListType;
79 using InputPixelType = typename InputMeshType::PixelType;
80 using InputTraits = typename InputMeshType::Traits;
82 static constexpr unsigned int InputVDimension = InputMeshType::PointDimension;
84 using InputPointsContainer = typename InputMeshType::PointsContainer;
85 using InputPointsContainerConstIterator = typename InputMeshType::PointsContainerConstIterator;
87 using InputCellsContainerConstIterator = typename InputMeshType::CellsContainerConstIterator;
88 using InputEdgeCellType = typename InputMeshType::EdgeCellType;
89 using InputPolygonCellType = typename InputMeshType::PolygonCellType;
90 using InputPointIdList = typename InputMeshType::PointIdList;
92 using InputQEIterator = typename InputQEType::IteratorGeom;
94 using InputMapPointIdentifier = std::map<InputPointIdentifier, InputPointIdentifier>;
95 using InputMapPointIdentifierIterator = typename InputMapPointIdentifier::iterator;
96
98 using OutputMeshType = TOutputMesh;
101 using OutputCoordRepType = typename OutputMeshType::CoordRepType;
103 using OutputPointIdentifier = typename OutputMeshType::PointIdentifier;
104 using OutputQEType = typename OutputMeshType::QEType;
106 using OutputQEIterator = typename OutputQEType::IteratorGeom;
107 using OutputPointsContainerIterator = typename OutputMeshType::PointsContainerIterator;
109 static constexpr unsigned int OutputVDimension = OutputMeshType::PointDimension;
111 using SolverTraits = TSolverTraits;
112 using ValueType = typename SolverTraits::ValueType;
113 using MatrixType = typename SolverTraits::MatrixType;
114 using VectorType = typename SolverTraits::VectorType;
120
121public:
122 void
123 SetCoefficientsMethod(CoefficientsComputation * iMethod)
124 {
125 this->m_CoefficientsMethod = iMethod;
126 }
128 itkNewMacro(Self);
129 itkOverrideGetNameOfClassMacro(ParameterizationQuadEdgeMeshFilter);
132 itkGetModifiableObjectMacro(BorderTransform, MeshBorderTransform);
133
134protected:
136 ~ParameterizationQuadEdgeMeshFilter() override = default;
137 void
138 PrintSelf(std::ostream & os, Indent indent) const override;
140 CoefficientsComputation * m_CoefficientsMethod{};
142 MeshBorderTransformPointer m_BorderTransform{};
143
144 // first is the id of the input mesh and second is the corresponding id
145 // in m_BoundaryPtMap
146 InputMapPointIdentifier m_BoundaryPtMap{};
147
148 // first is the id of the input mesh and second is the corresponding id
149 // in m_InternalPtList
150 InputMapPointIdentifier m_InternalPtMap{};
152 std::vector<OutputPointType> m_Border{};
153
154 void
155 CopyToOutputBorder();
156
166 void
167 ComputeListOfInteriorVertices();
168
176 void
177 FillMatrix(MatrixType & iM, VectorType & ioBx, VectorType & ioBy);
178
189 void
190 SolveLinearSystems(const MatrixType & iM,
191 const VectorType & iBx,
192 const VectorType & iBy,
193 VectorType & oX,
194 VectorType & oY);
195
196 void
197 GenerateData() override;
198
199private:
200};
201} // end namespace itk
202
203#include "itkParameterizationQuadEdgeMeshFilter.hxx"
204
205#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::CoordRepType InputCoordRepType
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 InputMeshType::PointIdList InputPointIdList
typename OutputMeshType::PointsContainerIterator OutputPointsContainerIterator
typename OutputMeshType::VectorType OutputVectorType
typename InputMeshType::EdgeCellType InputEdgeCellType
typename OutputMeshType::CoordRepType OutputCoordRepType
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....