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 
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;
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;
85 
86  static constexpr unsigned int InputVDimension = InputMeshType::PointDimension;
87 
88  using InputPointsContainer = typename InputMeshType::PointsContainer;
89  using InputPointsContainerConstIterator = typename InputMeshType::PointsContainerConstIterator;
90 
91  using InputCellsContainerConstIterator = typename InputMeshType::CellsContainerConstIterator;
92  using InputEdgeCellType = typename InputMeshType::EdgeCellType;
93  using InputPolygonCellType = typename InputMeshType::PolygonCellType;
94  using InputPointIdList = typename InputMeshType::PointIdList;
95 
96  using InputQEIterator = typename InputQEType::IteratorGeom;
97 
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;
116 
117  static constexpr unsigned int OutputVDimension = OutputMeshType::PointDimension;
118 
119  using SolverTraits = TSolverTraits;
120  using ValueType = typename SolverTraits::ValueType;
121  using MatrixType = typename SolverTraits::MatrixType;
123 
126 
128 
129 public:
130  void
132  {
133  this->m_CoefficientsMethod = iMethod;
134  }
135 
136  itkNewMacro(Self);
137  itkOverrideGetNameOfClassMacro(ParameterizationQuadEdgeMeshFilter);
138 
139  itkSetObjectMacro(BorderTransform, MeshBorderTransform);
140  itkGetModifiableObjectMacro(BorderTransform, MeshBorderTransform);
141 
142 protected:
144  ~ParameterizationQuadEdgeMeshFilter() override = default;
145  void
146  PrintSelf(std::ostream & os, Indent indent) const override;
147 
148  CoefficientsComputation * m_CoefficientsMethod{};
149 
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{};
159 
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 
207 private:
208 };
209 } // end namespace itk
210 
211 #include "itkParameterizationQuadEdgeMeshFilter.hxx"
212 
213 #endif
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkAddImageFilter.h:94
itk::QuadEdgeMeshToQuadEdgeMeshFilter::InputCoordinateType
typename InputMeshType::CoordinateType InputCoordinateType
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:52
itk::ParameterizationQuadEdgeMeshFilter::SolverTraits
TSolverTraits SolverTraits
Definition: itkParameterizationQuadEdgeMeshFilter.h:119
itk::MeshSource::OutputMeshPointer
typename OutputMeshType::Pointer OutputMeshPointer
Definition: itkMeshSource.h:69
itk::ParameterizationQuadEdgeMeshFilter::InputPointsContainer
typename InputMeshType::PointsContainer InputPointsContainer
Definition: itkParameterizationQuadEdgeMeshFilter.h:88
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:66
itk::ParameterizationQuadEdgeMeshFilter::ValueType
typename SolverTraits::ValueType ValueType
Definition: itkParameterizationQuadEdgeMeshFilter.h:120
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
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:57
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::ParameterizationQuadEdgeMeshFilter::VectorType
typename SolverTraits::VectorType VectorType
Definition: itkParameterizationQuadEdgeMeshFilter.h:122
BorderTransform
itk::QuadEdgeMeshToQuadEdgeMeshFilter::InputPointIdList
typename InputMeshType::PointIdList InputPointIdList
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:73
itk::QuadEdgeMeshToQuadEdgeMeshFilter::InputPointIdentifier
typename InputMeshType::PointIdentifier InputPointIdentifier
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:58
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:125
itk::QuadEdgeMeshToQuadEdgeMeshFilter::OutputVectorType
typename OutputMeshType::VectorType OutputVectorType
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:91
itk::QuadEdgeMeshToQuadEdgeMeshFilter
Duplicates the content of a Mesh.
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:37
itkQuadEdgeMeshParamMatrixCoefficients.h
itk::ParameterizationQuadEdgeMeshFilter::InputPixelType
typename InputMeshType::PixelType InputPixelType
Definition: itkParameterizationQuadEdgeMeshFilter.h:83
itk::ParameterizationQuadEdgeMeshFilter::InputQEType
typename InputMeshType::QEType InputQEType
Definition: itkParameterizationQuadEdgeMeshFilter.h:80
itk::QuadEdgeMeshToQuadEdgeMeshFilter::OutputCoordinateType
typename OutputMeshType::CoordinateType OutputCoordinateType
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:83
itk::ParameterizationQuadEdgeMeshFilter::MatrixType
typename SolverTraits::MatrixType MatrixType
Definition: itkParameterizationQuadEdgeMeshFilter.h:121
itk::ParameterizationQuadEdgeMeshFilter::SetCoefficientsMethod
void SetCoefficientsMethod(CoefficientsComputation *iMethod)
Definition: itkParameterizationQuadEdgeMeshFilter.h:131
itk::QuadEdgeMeshToQuadEdgeMeshFilter::InputEdgeCellType
typename InputMeshType::EdgeCellType InputEdgeCellType
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:71
itk::ParameterizationQuadEdgeMeshFilter
Compute a planar parameterization of the input mesh.
Definition: itkParameterizationQuadEdgeMeshFilter.h:56
itk::ParameterizationQuadEdgeMeshFilter::InputEdgeListType
typename InputMeshType::EdgeListType InputEdgeListType
Definition: itkParameterizationQuadEdgeMeshFilter.h:82
itkBorderQuadEdgeMeshFilter.h
itk::ParameterizationQuadEdgeMeshFilter::InputTraits
typename InputMeshType::Traits InputTraits
Definition: itkParameterizationQuadEdgeMeshFilter.h:84
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::MatrixCoefficients
Superclass for all the matrix coefficients computation classes.
Definition: itkQuadEdgeMeshParamMatrixCoefficients.h:33
itk::ParameterizationQuadEdgeMeshFilter::OutputQEType
typename OutputMeshType::QEType OutputQEType
Definition: itkParameterizationQuadEdgeMeshFilter.h:112
itk::QuadEdgeMeshToQuadEdgeMeshFilter::InputPolygonCellType
typename InputMeshType::PolygonCellType InputPolygonCellType
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:72
itk::MeshSource::OutputMeshType
TOutputMesh OutputMeshType
Definition: itkMeshSource.h:68
itk::ParameterizationQuadEdgeMeshFilter::InputPointVectorType
typename InputPointType::VectorType InputPointVectorType
Definition: itkParameterizationQuadEdgeMeshFilter.h:78
AddImageFilter
Definition: itkAddImageFilter.h:81
itk::QuadEdgeMeshToQuadEdgeMeshFilter::InputVectorType
typename InputMeshType::VectorType InputVectorType
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:60
itk::QuadEdgeMeshToQuadEdgeMeshFilter::OutputQEIterator
typename OutputQEPrimal::IteratorGeom OutputQEIterator
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:92
itk::ParameterizationQuadEdgeMeshFilter::InputMapPointIdentifier
std::map< InputPointIdentifier, InputPointIdentifier > InputMapPointIdentifier
Definition: itkParameterizationQuadEdgeMeshFilter.h:98
itk::QuadEdgeMeshToQuadEdgeMeshFilter::OutputPointIdentifier
typename OutputMeshType::PointIdentifier OutputPointIdentifier
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:89
itk::QuadEdgeMeshToQuadEdgeMeshFilter::OutputPointType
typename OutputMeshType::PointType OutputPointType
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:88
itk::QuadEdgeMeshToQuadEdgeMeshFilter::OutputMeshConstPointer
typename OutputMeshType::ConstPointer OutputMeshConstPointer
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:82
itk::ParameterizationQuadEdgeMeshFilter::InputMapPointIdentifierIterator
typename InputMapPointIdentifier::iterator InputMapPointIdentifierIterator
Definition: itkParameterizationQuadEdgeMeshFilter.h:99
itk::QuadEdgeMeshToQuadEdgeMeshFilter::OutputPointsContainerIterator
typename OutputMeshType::PointsContainerIterator OutputPointsContainerIterator
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:93
itk::QuadEdgeMeshToQuadEdgeMeshFilter::InputCellsContainerConstIterator
typename InputMeshType::CellsContainerConstIterator InputCellsContainerConstIterator
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:68
itk::QuadEdgeMeshToQuadEdgeMeshFilter::InputQEIterator
typename InputQEPrimal::IteratorGeom InputQEIterator
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:77