ITK  6.0.0
Insight Toolkit
itkConformalFlatteningMeshFilter.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 itkConformalFlatteningMeshFilter_h
19#define itkConformalFlatteningMeshFilter_h
20
21#include "itkMesh.h"
22#include "itkMeshToMeshFilter.h"
23
24// vnl headers
25#include "itkMath.h"
26#include "vnl/vnl_sparse_matrix.h"
27
28
29namespace itk
30{
46template <typename TInputMesh, typename TOutputMesh>
47class ITK_TEMPLATE_EXPORT ConformalFlatteningMeshFilter : public MeshToMeshFilter<TInputMesh, TOutputMesh>
48{
49public:
50 ITK_DISALLOW_COPY_AND_MOVE(ConformalFlatteningMeshFilter);
51
54
55 using InputMeshType = TInputMesh;
56 using OutputMeshType = TOutputMesh;
57
59
62
67
69 // using CoordRepType = typename TInputMesh::CoordRepType;
70 using CoordRepType = double;
71
73 itkNewMacro(Self);
74
76 itkOverrideGetNameOfClassMacro(ConformalFlatteningMeshFilter);
77
79 static constexpr unsigned int InputPointDimension = TInputMesh::PointDimension;
80 static constexpr unsigned int OutputPointDimension = TOutputMesh::PointDimension;
81
82 using PointsContainer = typename InputMeshType::PointsContainer;
83 using CellsContainer = typename InputMeshType::CellsContainer;
84 using PointIdentifier = typename InputMeshType::PointIdentifier;
85 using CellIdentifier = typename InputMeshType::CellIdentifier;
86 using PointIterator = typename PointsContainer::ConstIterator;
87 using CellIterator = typename CellsContainer::ConstIterator;
88 using CellType = typename InputMeshType::CellType;
89 using PointIdIterator = typename CellType::PointIdIterator;
90 using CellAutoPointer = typename CellType::CellAutoPointer;
91
97 void
99
102 void
103 SetScale(double);
104
106 void
108
111 void
113
114protected:
116 ~ConformalFlatteningMeshFilter() override = default;
117 void
118 PrintSelf(std::ostream & os, Indent indent) const override;
119
121 void
122 GenerateData() override;
123
124private:
125 using VectorCoordType = vnl_vector<CoordRepType>;
126 using SparseMatrixCoordType = vnl_sparse_matrix<CoordRepType>;
127
130 unsigned int m_PolarCellIdentifier{};
131
133 bool m_MapToSphere{};
134
137 double m_MapScale{};
138};
139} // end namespace itk
140
141#ifndef ITK_MANUAL_INSTANTIATION
142# include "itkConformalFlatteningMeshFilter.hxx"
143#endif
144
145#endif
ConformalFlatteningMeshFilter applies a conformal mapping from 3D to 2D.
typename InputMeshType::CellIdentifier CellIdentifier
void SetPolarCellIdentifier(CellIdentifier cellId)
typename InputMeshType::PointType InputPointType
typename CellsContainer::ConstIterator CellIterator
typename CellType::CellAutoPointer CellAutoPointer
void PrintSelf(std::ostream &os, Indent indent) const override
vnl_sparse_matrix< CoordRepType > SparseMatrixCoordType
typename CellType::PointIdIterator PointIdIterator
typename InputMeshType::ConstPointer InputMeshConstPointer
~ConformalFlatteningMeshFilter() override=default
typename InputMeshType::CellsContainer CellsContainer
typename InputMeshType::PointIdentifier PointIdentifier
typename PointsContainer::ConstIterator PointIterator
typename OutputMeshType::PointType OutputPointType
typename InputMeshType::PointsContainer PointsContainer
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
typename OutputMeshType::Pointer OutputMeshPointer
Definition: itkMeshSource.h:69
TOutputMesh OutputMeshType
Definition: itkMeshSource.h:68
MeshToMeshFilter is the base class for all process objects that output mesh data, and require mesh da...
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....