ITK  4.8.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 "vnl/vnl_math.h"
26 #include "vnl/vnl_sparse_matrix.h"
27 
28 
29 namespace itk
30 {
47 template< typename TInputMesh, typename TOutputMesh >
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;
65  typedef typename InputMeshType::PointType InputPointType;
66  typedef typename OutputMeshType::PointType OutputPointType;
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 
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  //purposely not implemented
124  //purposely not implemented
125  void operator=(const ConformalFlatteningMeshFilter &);
126 
127  typedef vnl_vector< CoordRepType > VectorCoordType;
128  typedef vnl_sparse_matrix< CoordRepType > SparseMatrixCoordType;
129 
132  unsigned int m_PolarCellIdentifier;
133 
136 
139  double m_MapScale;
140 };
141 } // end namespace itk
142 
143 #ifndef ITK_MANUAL_INSTANTIATION
144 #include "itkConformalFlatteningMeshFilter.hxx"
145 #endif
146 
147 #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.
virtual void GenerateData() override
void SetPolarCellIdentifier(CellIdentifier cellId)
Control indentation during Print() invocation.
Definition: itkIndent.h:49
vnl_sparse_matrix< CoordRepType > SparseMatrixCoordType
MeshToMeshFilter< TInputMesh, TOutputMesh > Superclass
void PrintSelf(std::ostream &os, Indent indent) const override