ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkParameterizationQuadEdgeMeshFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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  * http://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 
24 namespace itk {
25 
55 template< typename TInputMesh, typename TOutputMesh, typename TSolverTraits >
56 class ITK_TEMPLATE_EXPORT ParameterizationQuadEdgeMeshFilter:
57  public QuadEdgeMeshToQuadEdgeMeshFilter< TInputMesh, TOutputMesh >
58 {
59 public:
60  ITK_DISALLOW_COPY_AND_ASSIGN(ParameterizationQuadEdgeMeshFilter);
61 
64  using Superclass = QuadEdgeMeshToQuadEdgeMeshFilter< TInputMesh,
65  TOutputMesh >;
68 
70  using InputMeshType = TInputMesh;
71  using InputMeshPointer = typename InputMeshType::Pointer;
72  using InputMeshConstPointer = typename InputMeshType::ConstPointer;
73  using InputCoordRepType = typename InputMeshType::CoordRepType;
76  using InputPointIdentifier = typename InputMeshType::PointIdentifier;
77  using InputQEType = typename InputMeshType::QEType;
79  using InputEdgeListType = typename InputMeshType::EdgeListType;
80  using InputPixelType = typename InputMeshType::PixelType;
81  using InputTraits = typename InputMeshType::Traits;
82 
83  static constexpr unsigned int InputVDimension = InputMeshType::PointDimension;
84 
85  using InputPointsContainer = typename InputMeshType::PointsContainer;
86  using InputPointsContainerConstIterator = typename InputMeshType::PointsContainerConstIterator;
87 
88  using InputCellsContainerConstIterator = typename InputMeshType::CellsContainerConstIterator;
89  using InputEdgeCellType = typename InputMeshType::EdgeCellType;
90  using InputPolygonCellType = typename InputMeshType::PolygonCellType;
91  using InputPointIdList = typename InputMeshType::PointIdList;
92 
93  using InputQEIterator = typename InputQEType::IteratorGeom;
94 
95  using InputMapPointIdentifier = std::map< InputPointIdentifier, InputPointIdentifier >;
96  using InputMapPointIdentifierIterator = typename InputMapPointIdentifier::iterator;
97 
99  using OutputMeshType = TOutputMesh;
100  using OutputMeshPointer = typename OutputMeshType::Pointer;
101  using OutputMeshConstPointer = typename OutputMeshType::ConstPointer;
102  using OutputCoordRepType = typename OutputMeshType::CoordRepType;
104  using OutputPointIdentifier = typename OutputMeshType::PointIdentifier;
105  using OutputQEType = typename OutputMeshType::QEType;
107  using OutputQEIterator = typename OutputQEType::IteratorGeom;
108  using OutputPointsContainerIterator = typename OutputMeshType::PointsContainerIterator;
109 
110  static constexpr unsigned int OutputVDimension = OutputMeshType::PointDimension;
111 
112  using SolverTraits = TSolverTraits;
113  using ValueType = typename SolverTraits::ValueType;
114  using MatrixType = typename SolverTraits::MatrixType;
116 
119 
121 
122 public:
123 
125  {
126  this->m_CoefficientsMethod = iMethod;
127  }
128 
129  itkNewMacro(Self);
131 
132  itkSetObjectMacro(BorderTransform, MeshBorderTransform);
133  itkGetModifiableObjectMacro(BorderTransform, MeshBorderTransform);
134 
135 protected:
136 
138  ~ParameterizationQuadEdgeMeshFilter() override = default;
139  void PrintSelf(std::ostream & os, Indent indent) const override;
140 
142 
144 
145  // first is the id of the input mesh and second is the corresponding id
146  // in m_BoundaryPtMap
148 
149  // first is the id of the input mesh and second is the corresponding id
150  // in m_InternalPtList
152 
153  std::vector< OutputPointType > m_Border;
154 
155  void CopyToOutputBorder();
156 
166  void ComputeListOfInteriorVertices();
167 
175  void FillMatrix(MatrixType & iM, VectorType & ioBx, VectorType & ioBy);
176 
187  void SolveLinearSystems(const MatrixType & iM,
188  const VectorType & iBx,
189  const VectorType & iBy,
190  VectorType & oX,
191  VectorType & oY);
192 
193  void GenerateData() override;
194 
195 private:
196 
197 };
198 } // end namespace itk
199 
200 #include "itkParameterizationQuadEdgeMeshFilter.hxx"
201 
202 #endif
typename InputMeshType::CoordRepType InputCoordRepType
typename OutputMeshType::PointsContainerIterator OutputPointsContainerIterator
Light weight base class for most itk classes.
TOutputMesh OutputMeshType
Definition: itkMeshSource.h:68
typename InputMeshType::PointsContainer InputPointsContainer
typename InputQEPrimal::IteratorGeom InputQEIterator
std::map< InputPointIdentifier, InputPointIdentifier > InputMapPointIdentifier
typename InputMeshType::PointIdentifier InputPointIdentifier
typename InputMeshType::ConstPointer InputMeshConstPointer
typename InputMeshType::PolygonCellType InputPolygonCellType
typename OutputMeshType::PointIdentifier OutputPointIdentifier
typename OutputMeshType::CoordRepType OutputCoordRepType
typename InputMeshType::Pointer InputMeshPointer
typename InputMeshType::PointsContainerConstIterator InputPointsContainerConstIterator
typename OutputMeshType::ConstPointer OutputMeshConstPointer
typename OutputMeshType::Pointer OutputMeshPointer
Definition: itkMeshSource.h:69
typename MeshBorderTransform::Pointer MeshBorderTransformPointer
typename InputMeshType::EdgeCellType InputEdgeCellType
Transform one border of a QuadEdgeMesh into either a circle (conformal) or a square (arclength-wise)...
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename OutputMeshType::VectorType OutputVectorType
typename InputMeshType::CellsContainerConstIterator InputCellsContainerConstIterator
Compute a planar parameterization of the input mesh.
typename InputMeshType::PointIdList InputPointIdList
void SetCoefficientsMethod(CoefficientsComputation *iMethod)
typename OutputQEPrimal::IteratorGeom OutputQEIterator
typename InputMapPointIdentifier::iterator InputMapPointIdentifierIterator
Superclass for all the matrix coefficients computation classes.