ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkSimplexMesh.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 itkSimplexMesh_h
19#define itkSimplexMesh_h
20
21#include "itkMesh.h"
23#include "itkVertexCell.h"
24#include "itkTriangleCell.h"
25#include "itkFixedArray.h"
26#include <vector>
27#include <algorithm>
28#include <set>
29
30namespace itk
31{
43template <typename TPixelType,
44 unsigned int VDimension = 3,
45 typename TMeshTraits =
47class ITK_TEMPLATE_EXPORT SimplexMesh : public Mesh<TPixelType, VDimension, TMeshTraits>
48{
49public:
50 ITK_DISALLOW_COPY_AND_MOVE(SimplexMesh);
51
54
57
60
63
66
68 using NeighborSetType = std::set<SizeValueType>;
69
71 using NeighborSetIterator = typename NeighborSetType::iterator;
72
74 using NeighborListType = std::vector<SizeValueType>;
75
77 using PointType = typename TMeshTraits::PointType;
78
80 using PointIdentifier = typename TMeshTraits::PointIdentifier;
81
83 using VectorType = typename PointType::VectorType;
84
87
89 using typename Superclass::CellType;
90
93
96
100
103
105 using GeometryMapIterator = typename GeometryMapType::Iterator;
106 using GeometryMapConstIterator = typename GeometryMapType::ConstIterator;
107
108 // Backward compatibility to expose enum from class.
110
112 itkNewMacro(Self);
113
115 itkOverrideGetNameOfClassMacro(SimplexMesh);
116
118 using MeshTraits = TMeshTraits;
119 using PixelType = typename MeshTraits::PixelType;
120 using PointsContainer = typename MeshTraits::PointsContainer;
122 using PointsContainerIterator = typename Superclass::PointsContainer::Iterator;
128 using typename Superclass::CellIdentifier;
129
131 itkSetMacro(GeometryData, GeometryMapPointer);
132
134 itkGetConstReferenceMacro(GeometryData, GeometryMapPointer);
135
137 itkSetMacro(LastCellId, CellIdentifier);
138
140 itkGetConstMacro(LastCellId, CellIdentifier);
141
146 void
147 CopyInformation(const DataObject * data) override;
148
156 AddEdge(PointIdentifier startPointId, PointIdentifier endPointId);
157
166 AddFace(CellAutoPointer & cellPointer);
167
173 ReplaceFace(CellIdentifier replaceIndex, CellAutoPointer & cellPointer);
174
180
185 GetNeighbors(PointIdentifier idx, unsigned int radius, NeighborListType * list = nullptr) const;
186
192 void
194
198 void
200
204 void
206
210 void
212
216 void
218
224
228 void
230
236
240 void
241 SetPhi(PointIdentifier idx, double value);
242
246 double
248
252 void
254
258 double
260
264 void
265 SetRadius(PointIdentifier idx, double value);
266
270 double
272
276 void
277 SetDistance(PointIdentifier idx, double value);
278
282 double
284
288
289protected:
292 ~SimplexMesh() override;
293 void
294 PrintSelf(std::ostream & os, Indent indent) const override;
296
301
309}; // End Class: SimplexMesh
310} // end namespace itk
311
312#ifndef ITK_MANUAL_INSTANTIATION
313# include "itkSimplexMesh.hxx"
314#endif
315
316#endif
A templated class holding a n-Dimensional covariant vector.
Base class for all data objects in ITK.
Control indentation during Print() invocation.
Definition itkIndent.h:50
Represents a line segment for a Mesh.
Definition itkLineCell.h:41
A wrapper of the STL "map" container.
typename CellsContainer::ConstPointer CellsContainerConstPointer
Definition itkMesh.h:200
typename PointsContainer::Pointer PointsContainerPointer
Definition itkMesh.h:198
CellInterface< CellPixelType, CellTraits > CellType
Definition itkMesh.h:222
typename CellsContainer::Pointer CellsContainerPointer
Definition itkMesh.h:199
typename MeshTraits::CellIdentifier CellIdentifier
Definition itkMesh.h:178
typename CellsContainer::ConstIterator CellsContainerConstIterator
Definition itkMesh.h:211
typename CellsContainer::Iterator CellsContainerIterator
Definition itkMesh.h:212
typename PointsContainer::ConstIterator PointsContainerConstIterator
Definition itkMesh.h:209
handle geometric properties for vertices of a simplex mesh
itk::FixedArray< IdentifierType, 3 > IndexArray
void ReplaceNeighbor(PointIdentifier pointIdx, PointIdentifier oldIdx, PointIdentifier newIdx)
typename MeshTraits::PixelType PixelType
void SetGeometryData(PointIdentifier pointId, SimplexMeshGeometry *)
typename TMeshTraits::PointIdentifier PointIdentifier
CellIdentifier m_LastCellId
CellIdentifier ReplaceFace(CellIdentifier replaceIndex, CellAutoPointer &cellPointer)
Mesh< TPixelType, VDimension, TMeshTraits > Superclass
IndexArray GetNeighbors(PointIdentifier idx) const
void SetDistance(PointIdentifier idx, double value)
PointType GetReferenceMetrics(PointIdentifier idx) const
itk::LineCell< CellType > LineType
void SetBarycentricCoordinates(PointIdentifier idx, PointType value)
double GetRadius(PointIdentifier idx) const
void SetMeanCurvature(PointIdentifier idx, double value)
PointType GetBarycentricCoordinates(PointIdentifier idx) const
SmartPointer< Self > Pointer
typename NeighborSetType::iterator NeighborSetIterator
typename PointType::VectorType VectorType
void SetReferenceMetrics(PointIdentifier idx, PointType value)
CovariantVector< typename VectorType::ValueType, 3 > CovariantVectorType
double GetPhi(PointIdentifier idx) const
CellIdentifier AddFace(CellAutoPointer &cellPointer)
void SwapNeighbors(PointIdentifier pointIdx, PointIdentifier firstIdx, PointIdentifier secondIdx)
typename CellType::CellAutoPointer CellAutoPointer
CellIdentifier AddEdge(PointIdentifier startPointId, PointIdentifier endPointId)
typename GeometryMapType::ConstIterator GeometryMapConstIterator
GeometryMapPointer m_GeometryData
void PrintSelf(std::ostream &os, Indent indent) const override
typename Superclass::PointsContainer::Iterator PointsContainerIterator
typename GeometryMapType::Iterator GeometryMapIterator
typename TMeshTraits::PointType PointType
void AddNeighbor(PointIdentifier pointIdx, PointIdentifier neighborIdx)
SmartPointer< const Self > ConstPointer
TMeshTraits MeshTraits
std::vector< SizeValueType > NeighborListType
void SetPhi(PointIdentifier idx, double value)
typename GeometryMapType::Pointer GeometryMapPointer
~SimplexMesh() override
CovariantVectorType ComputeNormal(PointIdentifier idx) const
double GetDistance(PointIdentifier idx) const
double GetMeanCurvature(PointIdentifier idx) const
typename SimplexMeshGeometry::IndexArray IndexArray
itk::MeshEnums::MeshClassCellsAllocationMethod MeshClassCellsAllocationMethodEnum
typename MeshTraits::PointsContainer PointsContainer
NeighborListType * GetNeighbors(PointIdentifier idx, unsigned int radius, NeighborListType *list=nullptr) const
std::set< SizeValueType > NeighborSetType
void SetRadius(PointIdentifier idx, double value)
itk::MapContainer< SizeValueType, SimplexMeshGeometry * > GeometryMapType
void CopyInformation(const DataObject *data) override
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....