ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkConformalFlatteningMeshFilter.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 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 
29 namespace itk
30 {
47 template< typename TInputMesh, typename TOutputMesh >
48 class ITK_TEMPLATE_EXPORT ConformalFlatteningMeshFilter:
49  public MeshToMeshFilter< TInputMesh, TOutputMesh >
50 {
51 public:
54 
55  typedef TInputMesh InputMeshType;
56  typedef TOutputMesh OutputMeshType;
57 
59 
62 
63  typedef typename InputMeshType::ConstPointer InputMeshConstPointer;
64  typedef typename OutputMeshType::Pointer OutputMeshPointer;
67 
69  //typedef typename TInputMesh::CoordRepType CoordRepType;
70  typedef double CoordRepType;
71 
73  itkNewMacro(Self);
74 
77 
79  itkStaticConstMacro(InputPointDimension, unsigned int,
80  TInputMesh::PointDimension);
81  itkStaticConstMacro(OutputPointDimension, unsigned int,
82  TOutputMesh::PointDimension);
84 
85  typedef typename InputMeshType::PointsContainer PointsContainer;
86  typedef typename InputMeshType::CellsContainer CellsContainer;
87  typedef typename InputMeshType::PointIdentifier PointIdentifier;
88  typedef typename InputMeshType::CellIdentifier CellIdentifier;
89  typedef typename PointsContainer::ConstIterator PointIterator;
90  typedef typename CellsContainer::ConstIterator CellIterator;
91  typedef typename InputMeshType::CellType CellType;
92  typedef typename CellType::PointIdIterator PointIdIterator;
93  typedef typename CellType::CellAutoPointer CellAutoPointer;
94 
100  void SetPolarCellIdentifier(CellIdentifier cellId);
101 
104  void SetScale(double);
105 
107  void MapToSphere();
108 
111  void MapToPlane();
112 
113 protected:
116  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
117 
119  virtual void GenerateData() ITK_OVERRIDE;
120 
121 private:
122  ITK_DISALLOW_COPY_AND_ASSIGN(ConformalFlatteningMeshFilter);
123 
124  typedef vnl_vector< CoordRepType > VectorCoordType;
125  typedef vnl_sparse_matrix< CoordRepType > SparseMatrixCoordType;
126 
129  unsigned int m_PolarCellIdentifier;
130 
132  bool m_MapToSphere;
133 
136  double m_MapScale;
137 };
138 } // end namespace itk
139 
140 #ifndef ITK_MANUAL_INSTANTIATION
141 #include "itkConformalFlatteningMeshFilter.hxx"
142 #endif
143 
144 #endif
Light weight base class for most itk classes.
MeshToMeshFilter is the base class for all process objects that output mesh data, and require mesh da...
ConformalFlatteningMeshFilter applies a conformal mapping from 3D to 2D.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
vnl_sparse_matrix< CoordRepType > SparseMatrixCoordType
MeshToMeshFilter< TInputMesh, TOutputMesh > Superclass