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 CoordinateType = typename TInputMesh::CoordinateType;
70 using CoordinateType = double;
71#ifndef ITK_FUTURE_LEGACY_REMOVE
72 using CoordRepType ITK_FUTURE_DEPRECATED(
73 "ITK 6 discourages using `CoordRepType`. Please use `CoordinateType` instead!") = CoordinateType;
74#endif
75
77 itkNewMacro(Self);
78
80 itkOverrideGetNameOfClassMacro(ConformalFlatteningMeshFilter);
81
83 static constexpr unsigned int InputPointDimension = TInputMesh::PointDimension;
84 static constexpr unsigned int OutputPointDimension = TOutputMesh::PointDimension;
85
86 using PointsContainer = typename InputMeshType::PointsContainer;
87 using CellsContainer = typename InputMeshType::CellsContainer;
88 using PointIdentifier = typename InputMeshType::PointIdentifier;
89 using CellIdentifier = typename InputMeshType::CellIdentifier;
90 using PointIterator = typename PointsContainer::ConstIterator;
91 using CellIterator = typename CellsContainer::ConstIterator;
92 using CellType = typename InputMeshType::CellType;
93 using PointIdIterator = typename CellType::PointIdIterator;
94 using CellAutoPointer = typename CellType::CellAutoPointer;
95
101 void
103
106 void
107 SetScale(double);
108
110 void
112
115 void
117
118protected:
120 ~ConformalFlatteningMeshFilter() override = default;
121 void
122 PrintSelf(std::ostream & os, Indent indent) const override;
123
125 void
126 GenerateData() override;
127
128private:
129 using VectorCoordType = vnl_vector<CoordinateType>;
130 using SparseMatrixCoordType = vnl_sparse_matrix<CoordinateType>;
131
134 unsigned int m_PolarCellIdentifier{};
135
137 bool m_MapToSphere{};
138
141 double m_MapScale{};
142};
143} // end namespace itk
144
145#ifndef ITK_MANUAL_INSTANTIATION
146# include "itkConformalFlatteningMeshFilter.hxx"
147#endif
148
149#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
typename CellType::PointIdIterator PointIdIterator
typename InputMeshType::ConstPointer InputMeshConstPointer
~ConformalFlatteningMeshFilter() override=default
typename InputMeshType::CellsContainer CellsContainer
vnl_sparse_matrix< CoordinateType > SparseMatrixCoordType
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....