ITK  5.2.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  * 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 {
26 
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_MOVE(ParameterizationQuadEdgeMeshFilter);
61 
67 
69  using InputMeshType = TInputMesh;
70  using InputMeshPointer = typename InputMeshType::Pointer;
71  using InputMeshConstPointer = typename InputMeshType::ConstPointer;
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;
81 
82  static constexpr unsigned int InputVDimension = InputMeshType::PointDimension;
83 
84  using InputPointsContainer = typename InputMeshType::PointsContainer;
85  using InputPointsContainerConstIterator = typename InputMeshType::PointsContainerConstIterator;
86 
87  using InputCellsContainerConstIterator = typename InputMeshType::CellsContainerConstIterator;
88  using InputEdgeCellType = typename InputMeshType::EdgeCellType;
89  using InputPolygonCellType = typename InputMeshType::PolygonCellType;
90  using InputPointIdList = typename InputMeshType::PointIdList;
91 
92  using InputQEIterator = typename InputQEType::IteratorGeom;
93 
94  using InputMapPointIdentifier = std::map<InputPointIdentifier, InputPointIdentifier>;
95  using InputMapPointIdentifierIterator = typename InputMapPointIdentifier::iterator;
96 
98  using OutputMeshType = TOutputMesh;
99  using OutputMeshPointer = typename OutputMeshType::Pointer;
100  using OutputMeshConstPointer = typename OutputMeshType::ConstPointer;
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;
108 
109  static constexpr unsigned int OutputVDimension = OutputMeshType::PointDimension;
110 
111  using SolverTraits = TSolverTraits;
112  using ValueType = typename SolverTraits::ValueType;
113  using MatrixType = typename SolverTraits::MatrixType;
115 
118 
120 
121 public:
122  void
124  {
125  this->m_CoefficientsMethod = iMethod;
126  }
127 
128  itkNewMacro(Self);
130 
131  itkSetObjectMacro(BorderTransform, MeshBorderTransform);
132  itkGetModifiableObjectMacro(BorderTransform, MeshBorderTransform);
133 
134 protected:
136  ~ParameterizationQuadEdgeMeshFilter() override = default;
137  void
138  PrintSelf(std::ostream & os, Indent indent) const override;
139 
141 
143 
144  // first is the id of the input mesh and second is the corresponding id
145  // in m_BoundaryPtMap
147 
148  // first is the id of the input mesh and second is the corresponding id
149  // in m_InternalPtList
151 
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 
199 private:
200 };
201 } // end namespace itk
202 
203 #include "itkParameterizationQuadEdgeMeshFilter.hxx"
204 
205 #endif
itk::ParameterizationQuadEdgeMeshFilter::m_BoundaryPtMap
InputMapPointIdentifier m_BoundaryPtMap
Definition: itkParameterizationQuadEdgeMeshFilter.h:146
itk::ParameterizationQuadEdgeMeshFilter::SolverTraits
TSolverTraits SolverTraits
Definition: itkParameterizationQuadEdgeMeshFilter.h:111
itk::MeshSource::OutputMeshPointer
typename OutputMeshType::Pointer OutputMeshPointer
Definition: itkMeshSource.h:69
itk::ParameterizationQuadEdgeMeshFilter::InputPointsContainer
typename InputMeshType::PointsContainer InputPointsContainer
Definition: itkParameterizationQuadEdgeMeshFilter.h:84
itk::MeshToMeshFilter::InputMeshPointer
typename InputMeshType::Pointer InputMeshPointer
Definition: itkMeshToMeshFilter.h:66
itk::GTest::TypedefsAndConstructors::Dimension2::VectorType
ImageBaseType::SpacingType VectorType
Definition: itkGTestTypedefsAndConstructors.h:53
itk::GTest::TypedefsAndConstructors::Dimension2::PointType
ImageBaseType::PointType PointType
Definition: itkGTestTypedefsAndConstructors.h:51
itk::QuadEdgeMeshToQuadEdgeMeshFilter::InputPointsContainerConstIterator
typename InputMeshType::PointsContainerConstIterator InputPointsContainerConstIterator
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:62
itk::ParameterizationQuadEdgeMeshFilter::ValueType
typename SolverTraits::ValueType ValueType
Definition: itkParameterizationQuadEdgeMeshFilter.h:112
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::ParameterizationQuadEdgeMeshFilter::m_InternalPtMap
InputMapPointIdentifier m_InternalPtMap
Definition: itkParameterizationQuadEdgeMeshFilter.h:150
itk::MeshToMeshFilter::InputMeshType
TInputMesh InputMeshType
Definition: itkMeshToMeshFilter.h:65
itk::QuadEdgeMeshToQuadEdgeMeshFilter::InputMeshConstPointer
typename InputMeshType::ConstPointer InputMeshConstPointer
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:51
itk::QuadEdgeMeshToQuadEdgeMeshFilter::InputPointType
typename InputMeshType::PointType InputPointType
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:53
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::ParameterizationQuadEdgeMeshFilter::VectorType
typename SolverTraits::VectorType VectorType
Definition: itkParameterizationQuadEdgeMeshFilter.h:114
BorderTransform
itk::QuadEdgeMeshToQuadEdgeMeshFilter::InputPointIdList
typename InputMeshType::PointIdList InputPointIdList
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:69
itk::QuadEdgeMeshToQuadEdgeMeshFilter::InputPointIdentifier
typename InputMeshType::PointIdentifier InputPointIdentifier
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:54
itk::BorderQuadEdgeMeshFilter
Transform one border of a QuadEdgeMesh into either a circle (conformal) or a square (arclength-wise).
Definition: itkBorderQuadEdgeMeshFilter.h:82
itk::ParameterizationQuadEdgeMeshFilter::MeshBorderTransformPointer
typename MeshBorderTransform::Pointer MeshBorderTransformPointer
Definition: itkParameterizationQuadEdgeMeshFilter.h:117
itk::QuadEdgeMeshToQuadEdgeMeshFilter::OutputVectorType
typename OutputMeshType::VectorType OutputVectorType
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:83
itk::QuadEdgeMeshToQuadEdgeMeshFilter
Duplicates the content of a Mesh.
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:37
itkQuadEdgeMeshParamMatrixCoefficients.h
itk::ParameterizationQuadEdgeMeshFilter::InputPixelType
typename InputMeshType::PixelType InputPixelType
Definition: itkParameterizationQuadEdgeMeshFilter.h:79
itk::ParameterizationQuadEdgeMeshFilter::InputQEType
typename InputMeshType::QEType InputQEType
Definition: itkParameterizationQuadEdgeMeshFilter.h:76
itk::QuadEdgeMeshToQuadEdgeMeshFilter::OutputCoordRepType
typename OutputMeshType::CoordRepType OutputCoordRepType
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:79
itk::ParameterizationQuadEdgeMeshFilter::MatrixType
typename SolverTraits::MatrixType MatrixType
Definition: itkParameterizationQuadEdgeMeshFilter.h:113
itk::ParameterizationQuadEdgeMeshFilter::SetCoefficientsMethod
void SetCoefficientsMethod(CoefficientsComputation *iMethod)
Definition: itkParameterizationQuadEdgeMeshFilter.h:123
itk::QuadEdgeMeshToQuadEdgeMeshFilter::InputEdgeCellType
typename InputMeshType::EdgeCellType InputEdgeCellType
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:67
itk::ParameterizationQuadEdgeMeshFilter
Compute a planar parameterization of the input mesh.
Definition: itkParameterizationQuadEdgeMeshFilter.h:56
itk::ParameterizationQuadEdgeMeshFilter::InputEdgeListType
typename InputMeshType::EdgeListType InputEdgeListType
Definition: itkParameterizationQuadEdgeMeshFilter.h:78
itkBorderQuadEdgeMeshFilter.h
itk::ParameterizationQuadEdgeMeshFilter::InputTraits
typename InputMeshType::Traits InputTraits
Definition: itkParameterizationQuadEdgeMeshFilter.h:80
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::QuadEdgeMeshToQuadEdgeMeshFilter::InputCoordRepType
typename InputMeshType::CoordRepType InputCoordRepType
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:52
itk::ParameterizationQuadEdgeMeshFilter::m_Border
std::vector< OutputPointType > m_Border
Definition: itkParameterizationQuadEdgeMeshFilter.h:152
itk::MatrixCoefficients
Superclass for all the matrix coefficients computation classes.
Definition: itkQuadEdgeMeshParamMatrixCoefficients.h:33
itk::ParameterizationQuadEdgeMeshFilter::OutputQEType
typename OutputMeshType::QEType OutputQEType
Definition: itkParameterizationQuadEdgeMeshFilter.h:104
itk::QuadEdgeMeshToQuadEdgeMeshFilter::InputPolygonCellType
typename InputMeshType::PolygonCellType InputPolygonCellType
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:68
itk::ParameterizationQuadEdgeMeshFilter::m_CoefficientsMethod
CoefficientsComputation * m_CoefficientsMethod
Definition: itkParameterizationQuadEdgeMeshFilter.h:140
itk::MeshSource::OutputMeshType
TOutputMesh OutputMeshType
Definition: itkMeshSource.h:68
itk::ParameterizationQuadEdgeMeshFilter::InputPointVectorType
typename InputPointType::VectorType InputPointVectorType
Definition: itkParameterizationQuadEdgeMeshFilter.h:74
itk::QuadEdgeMeshToQuadEdgeMeshFilter::InputVectorType
typename InputMeshType::VectorType InputVectorType
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:56
itk::QuadEdgeMeshToQuadEdgeMeshFilter::OutputQEIterator
typename OutputQEPrimal::IteratorGeom OutputQEIterator
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:84
itk::ParameterizationQuadEdgeMeshFilter::InputMapPointIdentifier
std::map< InputPointIdentifier, InputPointIdentifier > InputMapPointIdentifier
Definition: itkParameterizationQuadEdgeMeshFilter.h:94
itk::QuadEdgeMeshToQuadEdgeMeshFilter::OutputPointIdentifier
typename OutputMeshType::PointIdentifier OutputPointIdentifier
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:81
itk::QuadEdgeMeshToQuadEdgeMeshFilter::OutputPointType
typename OutputMeshType::PointType OutputPointType
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:80
itk::QuadEdgeMeshToQuadEdgeMeshFilter::OutputMeshConstPointer
typename OutputMeshType::ConstPointer OutputMeshConstPointer
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:78
itk::ParameterizationQuadEdgeMeshFilter::InputMapPointIdentifierIterator
typename InputMapPointIdentifier::iterator InputMapPointIdentifierIterator
Definition: itkParameterizationQuadEdgeMeshFilter.h:95
itk::QuadEdgeMeshToQuadEdgeMeshFilter::OutputPointsContainerIterator
typename OutputMeshType::PointsContainerIterator OutputPointsContainerIterator
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:85
itk::QuadEdgeMeshToQuadEdgeMeshFilter::InputCellsContainerConstIterator
typename InputMeshType::CellsContainerConstIterator InputCellsContainerConstIterator
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:64
itk::ParameterizationQuadEdgeMeshFilter::m_BorderTransform
MeshBorderTransformPointer m_BorderTransform
Definition: itkParameterizationQuadEdgeMeshFilter.h:142
itk::QuadEdgeMeshToQuadEdgeMeshFilter::InputQEIterator
typename InputQEPrimal::IteratorGeom InputQEIterator
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:73