ITK  6.0.0
Insight Toolkit
itkTriangleMeshToSimplexMeshFilter.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 itkTriangleMeshToSimplexMeshFilter_h
19#define itkTriangleMeshToSimplexMeshFilter_h
20
21#include "itkMapContainer.h"
22#include "itkSimplexMesh.h"
23#include "itkMeshToMeshFilter.h"
24#include "itkVectorContainer.h"
25
26#include "itkPolygonCell.h"
27namespace itk
28{
44template <typename TInputMesh, typename TOutputMesh>
45class ITK_TEMPLATE_EXPORT TriangleMeshToSimplexMeshFilter : public MeshToMeshFilter<TInputMesh, TOutputMesh>
46{
47public:
48 ITK_DISALLOW_COPY_AND_MOVE(TriangleMeshToSimplexMeshFilter);
49
52
55
59
61 itkNewMacro(Self);
62
64 itkOverrideGetNameOfClassMacro(TriangleMeshToSimplexMeshFilter);
65
66 using InputMeshType = TInputMesh;
69
70 using InputBoundaryAssignmentsContainerPointer = typename TInputMesh::BoundaryAssignmentsContainerPointer;
71
72 using InputPointsContainer = typename TInputMesh::PointsContainer;
74 using InputPointsContainerIterator = typename InputPointsContainer::Iterator;
75 using InputPointsContainerConstIterator = typename InputPointsContainer::ConstIterator;
76
79 using OutputPixelType = typename TOutputMesh::PixelType;
80 using OutputPointsContainer = typename TOutputMesh::PointsContainer;
82 using OutputPointsContainerIterator = typename TOutputMesh::PointsContainer::Iterator;
83
84 using InputBoundnaryAssignmentIdentifier = typename TInputMesh::BoundaryAssignmentIdentifier;
85
86 using InputCellType = typename TInputMesh::CellType;
87 using InputCellAutoPointer = typename InputCellType::CellAutoPointer;
88 using CellAutoPointer = typename TInputMesh::CellAutoPointer;
93
94 using CellIdentifier = typename TOutputMesh::CellIdentifier;
95 using PointIdentifier = typename TOutputMesh::PointIdentifier;
96 using CellFeatureIdentifier = typename TOutputMesh::CellFeatureIdentifier;
97
98 using EdgeIdentifierType = std::pair<CellIdentifier, CellIdentifier>;
99 using IndexSetType = std::set<CellIdentifier>;
100
103
107
110
111 using OutputCellType = typename TOutputMesh::CellType;
112 using OutputCellAutoPointer = typename TOutputMesh::CellAutoPointer;
115
116protected:
119
120 void
121 PrintSelf(std::ostream & os, Indent indent) const override;
122
126 void
127 GenerateData() override;
128
132 void
134
138 void
140
146 void
147 CreateEdgeForTrianglePair(CellIdentifier pointIndex, CellIdentifier boundaryId, TOutputMesh * outputMesh);
148
153 void
155
159 void
161
165 void
167 CellFeatureIdentifier featureId,
168 PointIdentifier startPointId,
169 PointIdentifier endPointId,
170 const InputMeshType * input);
171
172
178
182 IndexSetType * m_FaceSet{};
183
190 EdgeMapPointer m_Edges{};
191
195 typename EdgeNeighborListType::Pointer m_EdgeNeighborList{};
196
200 typename VertexNeighborListType::Pointer m_VertexNeighborList{};
201
205 typename LineCellIndexType::Pointer m_LineCellIndices{};
206
210 CellIdentifier m_CellIdxOffset{};
211
215 PointIdentifier m_IdOffset{};
216
220 CellIdentifier m_EdgeCellId{};
221
225 IdVectorPointer m_HandledEdgeIds{};
226
230 InputCellAutoPointer m_NewInputMeshCellPointer{};
231
235 OutputCellAutoPointer m_NewSimplexCellPointer{};
236};
237} // namespace itk
238
239#ifndef ITK_MANUAL_INSTANTIATION
240# include "itkTriangleMeshToSimplexMeshFilter.hxx"
241#endif
242
243#endif
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
Represents a line segment for a Mesh.
Definition: itkLineCell.h:41
A wrapper of the STL "map" container.
typename OutputMeshType::Pointer OutputMeshPointer
Definition: itkMeshSource.h:69
MeshToMeshFilter is the base class for all process objects that output mesh data, and require mesh da...
typename InputMeshType::Pointer InputMeshPointer
Represents a polygon in a Mesh.
This filter converts a triangle mesh into a 2-simplex mesh.
typename TInputMesh::CellAutoPointer CellAutoPointer
typename TInputMesh::BoundaryAssignmentIdentifier InputBoundnaryAssignmentIdentifier
InputPointType ComputeFaceCenter(CellIdentifier faceId, const InputMeshType *inputMesh)
typename TOutputMesh::PointsContainer::Iterator OutputPointsContainerIterator
typename InputPointsContainer::Iterator InputPointsContainerIterator
typename InputCellType::CellAutoPointer InputCellAutoPointer
void CreateNewEdge(CellIdentifier currentCellId, CellFeatureIdentifier featureId, PointIdentifier startPointId, PointIdentifier endPointId, const InputMeshType *input)
add edge cells to the input mesh
typename InputPointsContainer::ConstIterator InputPointsContainerConstIterator
typename InputPointsContainer::Pointer InputPointsContainerPointer
void PrintSelf(std::ostream &os, Indent indent) const override
typename OutputPointsContainer::Pointer OutputPointsContainerPointer
typename TOutputMesh::PointIdentifier PointIdentifier
std::pair< CellIdentifier, CellIdentifier > EdgeIdentifierType
typename TOutputMesh::CellFeatureIdentifier CellFeatureIdentifier
typename TInputMesh::PointsContainer InputPointsContainer
typename TInputMesh::BoundaryAssignmentsContainerPointer InputBoundaryAssignmentsContainerPointer
typename TOutputMesh::CellIdentifier CellIdentifier
void CreateEdgeForTrianglePair(CellIdentifier pointIndex, CellIdentifier boundaryId, TOutputMesh *outputMesh)
typename TOutputMesh::CellAutoPointer OutputCellAutoPointer
typename TOutputMesh::PointsContainer OutputPointsContainer
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
Represents a single vertex for a Mesh.
Definition: itkVertexCell.h:38
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....