ITK  6.0.0
Insight Toolkit
itkQuadEdgeMeshTopologyChecker.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 itkQuadEdgeMeshTopologyChecker_h
19 #define itkQuadEdgeMeshTopologyChecker_h
20 
22 
23 namespace itk
24 {
41 template <typename TMesh>
42 class ITK_TEMPLATE_EXPORT QuadEdgeMeshTopologyChecker : public Object
43 {
44 public:
45  ITK_DISALLOW_COPY_AND_MOVE(QuadEdgeMeshTopologyChecker);
46 
47  // Standard types
49  using Superclass = Object;
52 
53  using MeshType = TMesh;
54  using QEPrimal = typename MeshType::QEPrimal;
55  using EdgeCellType = typename MeshType::EdgeCellType;
56  using CellsContainerConstIterator = typename MeshType::CellsContainerConstIterator;
58 
59  using PointIdentifier = typename MeshType::PointIdentifier;
60  using CellIdentifier = typename MeshType::CellIdentifier;
61 
62 public:
63  itkNewMacro(Self);
64  itkOverrideGetNameOfClassMacro(QuadEdgeMeshTopologyChecker);
65 
66  itkSetConstObjectMacro(Mesh, MeshType);
67 
70 
71  itkSetMacro(ExpectedNumberOfPoints, PointIdentifier);
72  itkSetMacro(ExpectedNumberOfEdges, CellIdentifier);
73  itkSetMacro(ExpectedNumberOfFaces, CellIdentifier);
74  itkSetMacro(ExpectedNumberOfBoundaries, CellIdentifier);
75  itkSetMacro(ExpectedGenus, OffsetValueType);
76 
77  bool
78  ValidateEulerCharacteristic() const;
79 
80 protected:
82  ~QuadEdgeMeshTopologyChecker() override = default;
83  void
84  PrintSelf(std::ostream & os, Indent indent) const override;
85 
86 private:
88 
89  MeshPointer m_Mesh{};
90 
91  PointIdentifier m_ExpectedNumberOfPoints{};
92  CellIdentifier m_ExpectedNumberOfEdges{};
93  CellIdentifier m_ExpectedNumberOfFaces{};
94  CellIdentifier m_ExpectedNumberOfBoundaries{};
95  OffsetValueType m_ExpectedGenus{};
96 };
97 } // namespace itk
98 
99 #ifndef ITK_MANUAL_INSTANTIATION
100 # include "itkQuadEdgeMeshTopologyChecker.hxx"
101 #endif
102 
103 #endif
ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkAddImageFilter.h:94
itk::QuadEdgeMeshTopologyChecker::QEPrimal
typename MeshType::QEPrimal QEPrimal
Definition: itkQuadEdgeMeshTopologyChecker.h:54
itk::QuadEdgeMeshTopologyChecker::IdentifierType
itk::IdentifierType IdentifierType
Definition: itkQuadEdgeMeshTopologyChecker.h:68
itk::QuadEdgeMeshTopologyChecker::MeshType
TMesh MeshType
Definition: itkQuadEdgeMeshTopologyChecker.h:53
itk::QuadEdgeMeshTopologyChecker::EdgeCellType
typename MeshType::EdgeCellType EdgeCellType
Definition: itkQuadEdgeMeshTopologyChecker.h:55
itk::QuadEdgeMeshTopologyChecker::OffsetValueType
itk::OffsetValueType OffsetValueType
Definition: itkQuadEdgeMeshTopologyChecker.h:69
itk::QuadEdgeMeshBoundaryEdgesMeshFunction
Build a list of references to edges (as GeometricalQuadEdge::RawPointer) each one representing a diff...
Definition: itkQuadEdgeMeshBoundaryEdgesMeshFunction.h:37
itk::QuadEdgeMeshTopologyChecker::CellIdentifier
typename MeshType::CellIdentifier CellIdentifier
Definition: itkQuadEdgeMeshTopologyChecker.h:60
itk::QuadEdgeMeshTopologyChecker::CellsContainerConstIterator
typename MeshType::CellsContainerConstIterator CellsContainerConstIterator
Definition: itkQuadEdgeMeshTopologyChecker.h:56
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::QuadEdgeMeshTopologyChecker::PointIdentifier
typename MeshType::PointIdentifier PointIdentifier
Definition: itkQuadEdgeMeshTopologyChecker.h:59
itk::QuadEdgeMeshTopologyChecker
Make some basic checks in order to verify that the considered mesh is not degenerated and correctly r...
Definition: itkQuadEdgeMeshTopologyChecker.h:42
itk::OffsetValueType
long OffsetValueType
Definition: itkIntTypes.h:97
itk::QuadEdgeMeshTopologyChecker::MeshPointer
typename MeshType::ConstPointer MeshPointer
Definition: itkQuadEdgeMeshTopologyChecker.h:87
itkQuadEdgeMeshBoundaryEdgesMeshFunction.h
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::Mesh
Implements the N-dimensional mesh structure.
Definition: itkMesh.h:126
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:61
itk::IdentifierType
SizeValueType IdentifierType
Definition: itkIntTypes.h:90